mirror of
https://github.com/MPCStats/zk-stats-lib.git
synced 2026-01-09 05:27:57 -05:00
ci: create test.yml
This commit is contained in:
committed by
GitHub
parent
82999e656d
commit
56e2f3cdb1
37
.github/workflows/test.yml
vendored
Normal file
37
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Run tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python 3.11
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.11"
|
||||
- name: Use poetry
|
||||
uses: abatilo/actions-poetry@v2
|
||||
- name: Setup a local virtual environment
|
||||
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
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./.venv
|
||||
key: venv-${{ hashFiles('poetry.lock') }}
|
||||
- name: Install dependencies
|
||||
run: poetry install
|
||||
- name: Run the automated tests (for example)
|
||||
run: poetry run pytest -v
|
||||
Reference in New Issue
Block a user