forked from omicsNLP/Auto-CORPus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated the github action to ensure poetry is installed initially
- Loading branch information
1 parent
f8646ce
commit 7155fdf
Showing
1 changed file
with
50 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,50 @@ | ||
name: Test and build | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
python-version: ['3.12'] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# Install Poetry | ||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.8.3 | ||
|
||
# Cache Poetry dependencies | ||
- name: Cache Poetry Dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
**/.venv | ||
~/.cache/pypoetry | ||
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-poetry- | ||
# Install dependencies using Poetry | ||
- name: Install dependencies | ||
run: poetry install | ||
|
||
# Run tests using Poetry | ||
- name: Run tests | ||
run: poetry run pytest |