Weekly Tests #86
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
name: Weekly Tests | |
# run this workflow weekly | |
on: | |
schedule: | |
- cron: "0 0 * * 0" | |
workflow_dispatch: | |
concurrency: | |
group: weekly-${{ github.ref }} | |
jobs: | |
collect-tests: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: set-matrix | |
run: | | |
echo "matrix=$(ls tests/weekly/*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT | |
run-tests: | |
needs: collect-tests | |
runs-on: [self-hosted, linux] | |
strategy: | |
matrix: | |
experiment: ${{ fromJson(needs.collect-tests.outputs.matrix) }} | |
steps: | |
- name: 'Cleanup build folder' | |
run: | | |
ls -la ./ | |
rm -rf ./* || true | |
rm -rf ./.??* || true | |
ls -la ./ | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GMT_TOOLS_PAT }} | |
- name: Install external tools | |
run: | | |
eval `ssh-agent -s` | |
ssh-add - <<< '${{ secrets.GMT_TOOLS_DEPLOY_SSH_KEY }}' | |
make env | |
. .venv/bin/activate && python bfasst/external_tools.py install_test_yaml ${{ matrix.experiment }} | |
- name: tests | |
timeout-minutes: 240 | |
run: | | |
source .venv/bin/activate | |
python scripts/run.py ${{ matrix.experiment }} | |
- name: 'Create fname' | |
if: failure() | |
id: set-fname | |
run: echo "fname=$(basename ${{ matrix.experiment }} .yaml)" >> $GITHUB_OUTPUT | |
- name: 'Upload artifacts' | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.set-fname.outputs.fname }} | |
path: | | |
build/**/log.txt | |
build/**/*.log |