Skip to content

Commit

Permalink
Create ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinchai authored Nov 6, 2024
1 parent dff6f11 commit 43bfa02
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI
on: pull_request

jobs:
ci:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
poetry-version: ["latest", "main", "1.8.4"]
os: [ubuntu-22.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: View poetry --help
run: poetry --help
- name: Setup a local virtual environment (if no poetry.toml file)
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install the project dependencies
run: poetry install
- name: Run the automated tests (for example)
run: poetry run pytest -v
# - name: Run tests
# run: poetry run pytest tests

0 comments on commit 43bfa02

Please sign in to comment.