-
Notifications
You must be signed in to change notification settings - Fork 24
44 lines (40 loc) · 1.14 KB
/
ci.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
name: "Continuous Integration"
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
schedule:
- cron: '0 0 * * 1' # Runs at 00:00 UTC every Monday
workflow_dispatch:
env:
ENVIRONMENT: ci_cd
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ['3.9', '3.10', '3.11']
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: "Setup Python, Poetry and Dependencies"
uses: packetcoders/action-setup-cache-python-poetry@main
with:
python-version: "${{ matrix.python-version }}"
poetry-version: "${{ vars.POETRY_VERSION }}"
- name: Install Task
run: |
sudo sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
- name: Install the library
run: poetry install --no-interaction --only-root
- name: Run Continuous Integration checks
run: poetry run task ci-checks
- name: Upload coverage reports to Codecov
if: matrix.python-version == vars.PRIMARY_PYTHON_VERSION
uses: codecov/codecov-action@v3
env:
fail_ci_if_error: true