Skip to content

Commit

Permalink
💚 Add windows to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
pwwang committed Jun 26, 2023
1 parent 58265a7 commit 1ba64c4
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Deploy
name: Build

on:
push:
Expand Down Expand Up @@ -46,8 +46,41 @@ jobs:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: cov.xml

build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", 3.11]

steps:
- uses: actions/checkout@v2
- name: Setup Python # Set Python version
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8
python -m pip install poetry
poetry config virtualenvs.create false
poetry install -v
poetry install -E all
- name: Run flake8
run: flake8 simpleconf
- name: Test with pytest
run: pytest tests/ --junitxml=junit/test-results-${{ matrix.python-version }}.xml
- name: Upload pytest test results
uses: actions/upload-artifact@v2
with:
name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}

deploy:
needs: build
needs: [build, build-windows]
runs-on: ubuntu-latest
if: github.event_name == 'release'
strategy:
Expand Down

0 comments on commit 1ba64c4

Please sign in to comment.