Skip to content

Commit

Permalink
Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jvivian committed Sep 30, 2023
1 parent d4b1200 commit 10607d2
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
python-version:
required: false
description: "The python version to use"
default: "3.10"
default: "3.11"

runs:
using: "composite"
Expand All @@ -30,4 +30,4 @@ runs:
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction
shell: bash
shell: bash
14 changes: 4 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,14 @@ jobs:
- name: Set up the environment
uses: ./.github/actions/setup-poetry-env

- name: Run pre-commit
run: poetry run pre-commit run -a --show-diff-on-failure

- name: Inspect dependencies
run: poetry run deptry .

- name: Check Poetry lock file consistency
run: poetry lock --check
- name: Run checks
run: make check

tox:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']
fail-fast: false
steps:
- name: Check out
Expand Down Expand Up @@ -77,4 +71,4 @@ jobs:
uses: ./.github/actions/setup-poetry-env

- name: Check if documentation can be built
run: poetry run mkdocs build -s
run: poetry run mkdocs build -s
24 changes: 2 additions & 22 deletions .github/workflows/on-release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,9 @@ on:
branches: [main]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3

- name: Set up the environment
uses: ./.github/actions/setup-poetry-env

- name: Export tag
id: vars
run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT

- name: Build and publish
run: |
poetry version $RELEASE_VERSION
make build-and-publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}


deploy-docs:
runs-on: ubuntu-latest
needs: publish
steps:
- name: Check out
uses: actions/checkout@v3
Expand All @@ -39,3 +18,4 @@ jobs:

- name: Deploy documentation
run: poetry run mkdocs gh-deploy --force

15 changes: 15 additions & 0 deletions .github/workflows/validate-codecov-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: validate-codecov-config

on:
pull_request:
paths: [codecov.yaml]
push:
branches: [main]

jobs:
validate-codecov-config:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Validate codecov configuration
run: curl -sSL --fail-with-body --data-binary @codecov.yaml https://codecov.io/validate

0 comments on commit 10607d2

Please sign in to comment.