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

47 lines
1.1 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@v2
if: success() || failure()
with:
name: test-results
path: test-results
report:
runs-on: ubuntu-latest
needs: test
steps:
- uses: dorny/test-reporter@v1
with:
artifact: test-results
name: Tests
path: 'test-results/*.xml'
reporter: jest-junit