Skip to content

validation

validation #674

Workflow file for this run

name: validation
on:
push:
schedule:
- cron: "0 0 * * *"
jobs:
setup:
runs-on: ubuntu-latest
container:
image: ghcr.io/metabolicatlas/memote-docker:0.13
volumes:
- ${{ github.workspace }}:/project:rw
options: --user root --workdir /project
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Fetch list of repositories
run: |
git config --global --add safe.directory /__w/standard-GEM-validation/standard-GEM-validation
python -c 'import runner; runner.matrix()'
- name: Commit index of standard-GEMs
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_user_name: validation-bot
commit_message: update index of standard-GEMs
file_pattern: index.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Define job matrix from index
id: set-matrix
run: echo "matrix=$(cat index.json)" >> $GITHUB_OUTPUT
validate:
needs: setup
runs-on: ubuntu-latest
container:
image: ghcr.io/metabolicatlas/memote-docker:0.13
volumes:
- ${{ github.workspace }}:/project:rw
options: --user root --workdir /project
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
gem: ${{ fromJSON(needs.setup.outputs.matrix) }}
# max-parallel: 1
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Validate repository
run: |
git config --global --add safe.directory /__w/standard-GEM-validation/standard-GEM-validation
python -c 'import runner; runner.validate("${{ matrix.gem }}")'
- name: Update branch
run: git pull --ff
- name: Auto-commit results
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_user_name: validation-bot
commit_message: update validation results for ${{ matrix.gem }}
file_pattern: results/*.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}