Skip to content

Commit

Permalink
Workaround CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mbovo committed Jan 10, 2024
1 parent bae74e3 commit 9a52d75
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
python-version: '3.11'
- uses: arduino/setup-task@v1
- name: Prepare dev env
run: task setup
shell: bash
run: task setup-ci
- name: Lint and tests
run: |
source .venv/bin/activate
Expand Down
21 changes: 21 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ tasks:
- poetry.lock
method: checksum

dependency-install-ci:
cmds:
- poetry install
sources:
- poetry.lock
- pyproject.toml
generates:
- poetry.lock
method: checksum

setup:
desc: Bootstrap dev environment
preconditions:
Expand All @@ -70,6 +80,17 @@ tasks:
- task: pre-commit
- task: dependency-install

setup-ci:
preconditions:
- sh: "[ $(python3 --version | cut -d ' ' -f 2 | awk -F'.' '{print ($2 >= 8) }') = 1 ]"
msg: "Required python version not found (>=3.8)"
cmds:
- task: pre-commit-setup
- task: poetry-setup
- task: virtualenv
- task: pre-commit
- task: dependency-install-ci

test:
desc: Run python test and coverage
cmds:
Expand Down

0 comments on commit 9a52d75

Please sign in to comment.