From 261452090e11d39e1be46bdee05dcec791cc1af8 Mon Sep 17 00:00:00 2001 From: Florian Scherf Date: Sat, 20 Jul 2024 16:33:40 +0200 Subject: [PATCH] WIP: update ci Signed-off-by: Florian Scherf --- .github/workflows/ci.yml | 50 +++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab69847..b64a7d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,9 +12,21 @@ on: jobs: test: runs-on: ubuntu-latest + strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] + 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 app:latest MILAN_CI_TEST=1 tox -e py${{ matrix.python-version }} steps: - uses: actions/checkout@v4 @@ -23,26 +35,26 @@ jobs: 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: 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: python-${{ matrix.python-version }}-artifacts + name: ${{ matrix.python-version }}-artifacts path: artifacts