-
Notifications
You must be signed in to change notification settings - Fork 74
52 lines (45 loc) · 1.12 KB
/
ci.yaml
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
name: CI
on:
workflow_dispatch: # Allow running on-demand
push:
branches:
- main
paths:
- .github/workflows/ci.yaml
- poetry.lock
- pyproject.toml
- lanarky/**
- tests/**
- "!**.md"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- .github/workflows/ci.yaml
- poetry.lock
- pyproject.toml
- lanarky/**
- tests/**
- "!**.md"
env:
PYTHON_VERSION: 3.9
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build-and-test:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip poetry
poetry install --all-extras
- name: Run unit tests
run: make tests
- name: Upload coverage
run: make coverage