This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (69 loc) · 2.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Routine Checks
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: "0 0 * * *"
env:
PIP_CACHE_DIR: pip_cache
jobs:
Test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache wheels
id: cache_wheels
uses: actions/cache@v3
with:
path: ${{ env.PIP_CACHE_DIR }}
key: ${{ matrix.os }}${{ matrix.python-version }}
- name: Set up poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.3.1
- name: Install dependencies
run: poetry install
- name: Testing
run: poetry run pytest
- name: Building
run: poetry build
Coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup python 3.9
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Cache wheels
id: cache_wheels
uses: actions/cache@v3
with:
path: ${{ env.PIP_CACHE_DIR }}
key: coverage
- name: Set up poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.3.1
- name: Install dependencies
run: poetry install
- name: Run coverage tests
run: poetry run pytest --cov --cov-report=xml:coverage.xml
- name: Upload coverage
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov