-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6d2924
commit 2ebc528
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Continuous Integration for development | ||
|
||
on: pull_request | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Install lint dependencies | ||
run: | | ||
pip install pre-commit black | ||
- name: Install and run pre-commit | ||
uses: pre-commit/action@v3.0.0 | ||
test: | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- lint | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up testing python ${{ matrix.config.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.config.python-version }} | ||
- name: Install poetry | ||
uses: abatilo/actions-poetry@v2.3.0 | ||
- name: Setup a local virtual environment for caching | ||
run: | | ||
poetry config virtualenvs.create true --local | ||
poetry config virtualenvs.in-project true --local | ||
- name: Define a cache for the virtual environment based on the dependencies lock file to speed up later runs | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./.venv | ||
key: venv-${{ hashFiles('poetry.lock') }} | ||
- name: Install dependencies | ||
run: poetry install --no-root --without dev | ||
- name: Pytest | ||
run: poetry run pytest -x --random-order |