Skip to content

Commit

Permalink
Rework Github workflows to use actions/setup-python inbuilt caching.
Browse files Browse the repository at this point in the history
  • Loading branch information
SupImDos committed Mar 12, 2023
1 parent 405fadc commit 64b94cc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 39 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,16 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Poetry
run: pipx install poetry
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Cache Dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
cache: poetry
- name: Install Dependencies
run: poetry install --no-interaction --no-root
- name: Install Package
run: poetry install --no-interaction
- name: Run Linting
run: |
source $VENV
poe lint
run: poetry run poe lint
18 changes: 5 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,21 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Poetry
run: pipx install poetry
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Cache Dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
cache: poetry
- name: Install Dependencies
run: poetry install --no-interaction --no-root
- name: Install Package
run: poetry install --no-interaction
- name: Run Tests
run: |
source $VENV
poe test
coverage lcov
poetry run poe test
poetry run coverage lcov
- name: Coverage Results
uses: coverallsapp/github-action@master
with:
Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/typing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,16 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Poetry
run: pipx install poetry
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Cache Dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
cache: poetry
- name: Install Dependencies
run: poetry install --no-interaction --no-root
- name: Install Package
run: poetry install --no-interaction
- name: Run Type Checking
run: |
source $VENV
poe type
run: poetry run poe type

0 comments on commit 64b94cc

Please sign in to comment.