-
-
Notifications
You must be signed in to change notification settings - Fork 53
35 lines (33 loc) · 1.03 KB
/
main.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
name: CI
on:
push:
branches: [master]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- uses: actions/cache@v3
with:
path: |
~/.cache/pre-commit
~/.cache/pip
key: pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pre-commit mypy
python -m pip install -r requirements-dev.txt
- name: Run tests
run: pytest
- name: Run pre-commit
run: pre-commit run --verbose --all-files --show-diff-on-failure
# FIXME: mypy is failing due to missing types-* packages
# - name: Run mypy
# run: mypy algorithms_keeper/ tests/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3