You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dinglehopper/.github/workflows/test.yml

45 lines
1.0 KiB
YAML

name: test
on:
push:
branches:
- master
schedule:
- cron: "00 16 07 * *" # = monthly
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Update pip
run: python3 -m pip install -U pip
- name: Install requirements*.txt
run: |
for requirements_txt in requirements*.txt; do
python3 -m pip install -r $requirements_txt;
done
- name: Test
run: |
cd src
mkdir -p ../test-results
python3 -m pytest --junitxml=../test-results/junit.xml -o junit_family=legacy
- name: Upload test results
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: test-results
path: test-results
- name: Report tests
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Tests
path: 'test-results/junit.xml'
reporter: jest-junit