Skip to content

Commit c5300f6

Browse files
authored
Merge pull request #8 from audius/gha
Initial action
2 parents b2a25f4 + 1c4fe20 commit c5300f6

File tree

3 files changed

+49
-29
lines changed

3 files changed

+49
-29
lines changed

.github/workflows/main.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Run Unit Test via Pytest
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10","3.11","3.12","3.13"]
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: cache poetry install
23+
uses: actions/cache@v2
24+
with:
25+
path: ~/.local
26+
key: poetry-latest
27+
- uses: snok/install-poetry@v1
28+
- name: cache deps
29+
id: cache-deps
30+
uses: actions/cache@v2
31+
with:
32+
path: .venv
33+
key: pydeps-${{ hashFiles('**/poetry.lock') }}
34+
- run: poetry install --no-interaction --no-root
35+
if: steps.cache-deps.outputs.cache-hit != 'true'
36+
- run: poetry install --no-interaction
37+
- run: poetry run pytest

poetry.lock

Lines changed: 9 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ typer = {extras = ["all"], version = "^0.15"}
1515
pytenable = "^1.6"
1616
validators = "^0.24"
1717

18+
[tool.poetry.group.test.dependencies]
19+
pytest = "^8.3.4"
20+
1821
[poetry.group.dev.dependencies]
19-
pytest = "^8"
20-
pytest-mock = "^3.14.0"
2122
black = "^24.3"
2223
isort = "^5.13"
2324

0 commit comments

Comments
 (0)