Skip to content

Commit

Permalink
ci: Bump action versions (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelhly authored Sep 22, 2024
1 parent eab889a commit 6a72543
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 36 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.9

Expand All @@ -38,7 +38,7 @@ jobs:
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
Expand Down
30 changes: 16 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.11

Expand Down Expand Up @@ -65,9 +65,9 @@ jobs:

steps:
- name: checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.9

Expand All @@ -86,7 +86,7 @@ jobs:
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
Expand All @@ -104,28 +104,32 @@ jobs:

- name: Run tests
run: |
poetry run pytest ${{ matrix.test_path }} --cov
poetry run pytest ${{ matrix.test_path }} --cov
- name: Get uuid
id: uuid
run: |
echo "uuid=$(uuidgen)" >> $GITHUB_OUTPUT
- name: Upload partial coverage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: coverage${{ steps.uuid.outputs.uuid }}
path: .coverage
include-hidden-files: true
if-no-files-found: error

coverage:
needs: tests
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Python 3.9
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.9

Expand All @@ -144,7 +148,7 @@ jobs:
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
Expand All @@ -162,17 +166,15 @@ jobs:

- name: Download all coverage artifacts
# Downloads coverage1, coverage2, etc.
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4

- name: Run coverage
run: |
poetry run coverage combine coverage*/.coverage*
poetry run coverage xml
- name: Upload coverage to Codecov
# You may pin to the exact commit or the version.
# uses: codecov/codecov-action@6004246f47ab62d32be025ce173b241cd84ac58e
uses: codecov/codecov-action@v1.0.13
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
# Path to coverage file to upload
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
name: Release
on:
on:
push:
tags:
- '*'
- "*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- run: poetry build
- run: poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- run: poetry build
- run: poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }}

0 comments on commit 6a72543

Please sign in to comment.