Skip to content

Commit

Permalink
chore: Unit test as ci
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwtennis committed Nov 10, 2024
1 parent 6c8020a commit 896d622
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
File renamed without changes.
35 changes: 35 additions & 0 deletions .github/workflows/ch09_jobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI for Ch09 using python platform

on: push

defaults:
run:
working-directory: ./Ch09/

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.10" ]
poetry-version: [ "1.8.3" ]

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 }}
- 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 test
run: poetry run make test

3 changes: 3 additions & 0 deletions Ch09/poetry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[virtualenvs]
create = true
in-project = true

0 comments on commit 896d622

Please sign in to comment.