-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.08 KB
/
build-and-test.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
name: Build and test
on:
push
jobs:
cancel-previous:
runs-on: ubuntu-latest
steps:
- uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
build-and-test:
name: pytest
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4
- name: set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: install poetry
run: |
python -m pip install --no-cache-dir poetry==1.8 supervisor
- name: set up docker
run: make gha-setup
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Clean previous builds
run: rm -rf dist/*.whl
- name: Build with Poetry
run: poetry build
- name: Build docker image
run: make build
- name: run tests
run: make test