This repository has been archived by the owner on Mar 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
90 lines (86 loc) · 2.53 KB
/
testing.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Testing
on:
push:
branches:
- main
paths-ignore:
- docs/**
pull_request:
branches:
- main
paths-ignore:
- docs/**
jobs:
generate_output:
name: Generate Output
strategy:
fail-fast: false
matrix:
python-version:
- '3.11'
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
#----------------------------------------------
- name: Checkout repository
uses: actions/checkout@v3
#----------------------------------------------
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
#----------------------------------------------
- name: Install project
run: pip install .
- name: Create output files
run: python tests/generate_output.py
#----------------------------------------------
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Output
path: tests/output/
#----------------------------------------------
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Schemas
path: schemas/
validate_output:
needs: generate_output
name: Validate Output
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
#----------------------------------------------
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: Output
path: ./output
#----------------------------------------------
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: Schemas
path: ./schemas
#----------------------------------------------
- name: Validate Metadata.json
uses: ScratchAddons/validate-json-action@master
with:
schema: schemas/Metadata.schema.json
jsons: |
output/Metadata.json
output/Metadata-ComicInfo.json
output/Metadata-MetronInfo.json
#----------------------------------------------
- name: apt-get update
run: sudo apt-get update -y
- name: Install xmllint
run: sudo apt-get install -y libxml2-utils
- name: Validate ComicInfo.xml
run: xmllint --noout --schema schemas/ComicInfo.xsd output/ComicInfo*
- name: Validate MetronInfo.xml
run: xmllint --noout --schema schemas/MetronInfo.xsd output/MetronInfo*