-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 922 Bytes
/
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: CI
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["py38", "py39", "py310", "py311", "py312"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t app .
- name: Run pytest inside Docker container
run: |
docker run \
-v ./:/app \
-w /app \
-u root \
-e MILAN_CI_TEST=1 \
app:latest \
tox -e ${{ matrix.python-version }}
- name: Upload artifacts to GitHub
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.python-version }}-artifacts
path: artifacts
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}