-
Notifications
You must be signed in to change notification settings - Fork 4
90 lines (81 loc) · 2.6 KB
/
Copy pathselftest.yml
File metadata and controls
90 lines (81 loc) · 2.6 KB
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: selftest
on: # on any PRs and main branch changes
pull_request:
push:
branches:
- main
- 'releases/*'
jobs:
no-args:
runs-on: ubuntu-latest
steps:
- name: Clone this repository
uses: actions/checkout@v4
- name: Test without any input arguments
uses: ./
show-help:
runs-on: ubuntu-latest
steps:
- name: Clone this repository
uses: actions/checkout@v4
- name: Show help
uses: ./
with:
args: --help
show-version:
runs-on: ubuntu-latest
steps:
- name: Clone this repository
uses: actions/checkout@v4
- name: Show version
uses: ./
with:
args: --version
validate:
runs-on: ubuntu-latest
steps:
- name: Clone this repository
uses: actions/checkout@v4
- name: Validate a CITATION.cff file from the current directory
uses: ./
with:
args: --validate
subdirectory:
runs-on: ubuntu-latest
steps:
- name: Clone this repository
uses: actions/checkout@v4
- name: Validate a CITATION.cff from a subdirectory
uses: ./
with:
args: "--infile ./tests/subdirectory/CITATION.cff --validate"
convert-to-cff-on-stdout:
runs-on: ubuntu-latest
steps:
- name: Clone this repository
uses: actions/checkout@v4
- name: Show CITATION.cff from a subdirectory on stdout
uses: ./
with:
args: "--infile ./tests/subdirectory/CITATION.cff --format cff"
convert-to-zenodo-on-stdout:
runs-on: ubuntu-latest
steps:
- name: Clone this repository
uses: actions/checkout@v4
- name: Convert CITATION.cff from a subdirectory to Zenodo metadata format, show result on stdout
uses: ./
with:
args: "--infile ./tests/subdirectory/CITATION.cff --format zenodo"
convert-to-zenodo-and-compare:
runs-on: ubuntu-latest
steps:
- name: Clone this repository
uses: actions/checkout@v4
- name: Convert CITATION.cff from a subdirectory to Zenodo metadata format, show result on stdout
uses: ./
with:
args: "--infile ./tests/zenodo-equivalent/CITATION.cff --format zenodo --outfile ./tests/zenodo-equivalent/.zenodo.test.json"
- name: Compare the generated .zenodo.json with the expected
run: |
diff <(jq -S . ./tests/zenodo-equivalent/.zenodo.test.json) <(jq -S . ./tests/zenodo-equivalent/.zenodo.json)