-
Notifications
You must be signed in to change notification settings - Fork 25
37 lines (34 loc) · 1.08 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# From: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#using-the-python-starter-workflow
name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install packages
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -e .
- name: Check code format
run: black --check src tests
- name: Lint with flake8
run: python -m flake8 . --count --show-source --statistics
- name: Test with pytest
run: python -m pytest tests --cov=picklescan --doctest-modules --junitxml=junit/test-results.xml --cov-report=xml --cov-report=html
- name: Archive test results
uses: actions/upload-artifact@v3
with:
name: test
path: |
htmlcov
junit