Skip to content

Commit

Permalink
Update python-app.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
turukawa committed May 23, 2024
1 parent 6f269c7 commit 6c03967
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,36 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Ubuntu packages
run: |
sudo apt-get update
sudo apt-get -y install python3-dev libevent-dev pandoc default-jre
- name: Install core dependencies
sudo apt-get -y install python3-dev libevent-dev default-jre
- name: Install and configure Poetry
run: |
python -m pip install --upgrade pip
pip install poetry pytest
- name: Add Poetry to $PATH
run: |
pip install -U poetry pytest
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
poetry config virtualenvs.in-project true
- name: Set up cache
uses: actions/cache@v4
id: cached-poetry-dependencies
with:
path: .venv
key: venv-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/poetry.lock') }}
- name: Install poetry dependencies
run: |
poetry config virtualenvs.in-project true
poetry install --no-interaction
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Download pandoc
run: |
poetry remove pypandoc --no-interaction
poetry add pypandoc_binary --no-interaction
- name: Test with pytest
run: |
poetry run pytest

0 comments on commit 6c03967

Please sign in to comment.