marmoset-test-cases/.gitea/workflows/test-checker.yaml

34 lines
1.3 KiB
YAML
Raw Normal View History

name: Tests
2023-09-14 18:41:38 +01:00
on: [push, pull_request]
jobs:
Run-Tests:
2023-09-14 18:41:38 +01:00
runs-on: ubuntu-22.04
2023-09-14 19:00:01 +01:00
env:
DEBIAN_FRONTEND: noninteractive
2023-09-14 18:41:38 +01:00
steps:
- name: Check out repository code
uses: actions/checkout@v3
- run: cd ${{ github.workspace }}
- name: Run checker (passing)
2023-09-14 18:41:38 +01:00
run: |
cd tests/pass/
python3 ../../run-tests.py
- name: Run checker (failing)
run: |
cd tests/fail/
2023-09-16 16:36:37 +01:00
! python3 ../../run-tests.py
- name: Update badges (fail)
if: needs.pr-check.outputs.number != 'null' && github.ref == 'refs/heads/main' && failure()
run: |
curl -f -X 'GET' \
'https://badgeapi.docker.162536.xyz/set_badge/?repo=marmoset-test-cases&new_badge=Tests-failing-red' \
-H 'accept: application/json' \
2023-09-16 16:36:37 +01:00
-H 'X-API-Key: ${{ secrets.BADGE_API_KEY }}'
- name: Update badges (success)
if: needs.pr-check.outputs.number != 'null' && github.ref == 'refs/heads/main' && success()
run: |
curl -f -X 'GET' \
'https://badgeapi.docker.162536.xyz/set_badge/?repo=marmoset-test-cases&new_badge=Tests-passing-brightgreen' \
-H 'accept: application/json' \
-H 'X-API-Key: ${{ secrets.BADGE_API_KEY }}'