-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from mhpob/yamale
Add VR2 x VR2PC file and metadata; validate YAML metadata using Yamale
- Loading branch information
Showing
5 changed files
with
1,022 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Validation | ||
|
||
on: | ||
push: | ||
branches: [main, yamale] | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
list-metadata-files: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.file-matrix.outputs.matrix }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: file-matrix | ||
run: echo "::set-output name=matrix::$(find -iname metadata.yaml | jq -Rsc 'split("\n")[:-1]')" | ||
|
||
yamale-validate: | ||
needs: list-metadata-files | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
metadata-file: ${{ fromJSON(needs.list-metadata-files.outputs.matrix) }} | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Yamale | ||
run: "pip install yamale" | ||
|
||
- name: Install ruamel | ||
run: "pip install ruamel.yaml" | ||
|
||
- name: Run Yamale | ||
run: | | ||
yamale -s schema.yaml -p ruamel ${{ matrix.metadata-file }} | ||
# cff-validate: | ||
# needs: list-metadata-files | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# metadata-file: ${{ fromJSON(needs.list-metadata-files.outputs.matrix) }} | ||
# | ||
# steps: | ||
# - name: Validate citation | ||
# uses: dieghernan/cff-validator@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.Rproj.user | ||
.Rhistory | ||
.RData | ||
.Ruserdata | ||
*.Rproj |
Oops, something went wrong.