-
-
Notifications
You must be signed in to change notification settings - Fork 24
49 lines (38 loc) · 1.22 KB
/
tests.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
38
39
40
41
42
43
44
45
46
47
48
49
name: Quality & Tests
on: pull_request
permissions:
contents: read
pull-requests: write
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: actions/cache@v3
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements.txt', 'requirements-tests.txt') }}
- name: Install requirements
if: steps.cache.outputs.cache-hit != 'true'
run: python -m pip install -r requirements-tests.txt
- name: Style
run: python -m black --check --diff wikidict tests
- name: Lint
run: python -m flake8 wikidict tests
- name: Types
run: python -m mypy wikidict
- name: Unit tests
run: python -Wd -m pytest tests --doctest-modules wikidict
- name: Automerge
if: github.actor == 'dependabot[bot]'
uses: pascalgn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_LABELS: automerge,!DO_NOT_MERGE
MERGE_METHOD: squash
MERGE_DELETE_BRANCH: true