-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (51 loc) · 1.35 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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@v3
- name: Build Docker image
run: docker build -t app .
- name: Run pytest inside Docker container
run: |
docker run \
-v ./:/app \
-w /app \
-e MILAN_CI_TEST=1 \
app:latest \
tox -e py${{ matrix.python-version }}
# - uses: actions/checkout@v4
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: |
# sudo apt-get install -y
# pip install --upgrade setuptools tox
# pip install .[test]
# python -m playwright install-deps
# python -m playwright install
# - name: Run Tox
# env:
# MILAN_CI_TEST: 1
# run: tox -e py
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v4
# with:
# file: ./coverage.xml
- name: Upload artifacts to GitHub
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.python-version }}-artifacts
path: artifacts