Skip to content

Commit

Permalink
Update python-package.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
its0x4d authored Dec 13, 2023
1 parent 842bab0 commit a3542c4
Showing 1 changed file with 20 additions and 30 deletions.
50 changes: 20 additions & 30 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python package
name: Python Package CI

on:
push:
Expand All @@ -7,39 +7,29 @@ on:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

ci:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, 3.10, 3.11]

python-version: ["3.8", "3.9", "3.11"]
poetry-version: ["1.7.1"]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- uses: actions/checkout@v3

- name: Create Virtual Environment
run: |
python -m venv .venv
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Activate Virtual Environment
shell: bash
run: |
source .venv/bin/activate
- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}

- name: Install dependencies
run: |
poetry install
- name: Install dependencies
run: poetry install

- name: Run tests
run: |
poetry run pytest
- name: Run tests with pytest
run: poetry run pytest

0 comments on commit a3542c4

Please sign in to comment.