Skip to content

Commit

Permalink
Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoklosowski committed Sep 4, 2024
1 parent 4661550 commit bc21d97
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 32 deletions.
42 changes: 19 additions & 23 deletions .github/workflows/check-commit.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
name: Check Commit

on:
workflow_dispatch:
push:
branches:
- "*"
tags:
- "*"
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
name: Check Lints
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup poetry
run: pipx install poetry
run: pipx install poetry==1.8.3

- name: Generate datefile
run: echo "lint-$(date +%U)" > datefile

- name: Setup python
id: setup-python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: poetry
Expand All @@ -41,30 +37,30 @@ jobs:
- name: Install dependencies
if: steps.setup-python.outputs.cache-hit != 'true'
run: poetry install --only=main,type,dev
run: poetry install --sync --only=main,type,dev

- name: Run lints
run: make lint

test:
name: Test
runs-on: ubuntu-latest
name: Check Test
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup poetry
run: pipx install poetry
run: pipx install poetry==1.8.3

- name: Generate datefile
run: echo "test-$(date +%U)" > datefile

- name: Setup python
id: setup-python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: poetry
Expand All @@ -74,7 +70,7 @@ jobs:
- name: Install dependencies
if: steps.setup-python.outputs.cache-hit != 'true'
run: poetry install --only=main,dev
run: poetry install --sync --only=main,dev

- name: Run tests
run: make test
Expand All @@ -84,17 +80,17 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup poetry
run: pipx install poetry
run: pipx install poetry==1.8.3

- name: Generate datefile
run: echo "docs-$(date +%U)" > datefile

- name: Setup python
id: setup-python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.8"
cache: poetry
Expand All @@ -104,7 +100,7 @@ jobs:
- name: Install dependencies
if: steps.setup-python.outputs.cache-hit != 'true'
run: poetry install --only=docs
run: poetry install --sync --only=docs

- name: Check build
run: make docs-build
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ permissions:
jobs:
build-package:
name: Build Package
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup python
id: setup-python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.8"

Expand All @@ -29,7 +29,7 @@ jobs:
run: python -m build

- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: packages
path: dist
Expand All @@ -38,18 +38,18 @@ jobs:
github-release:
name: Release on GitHub
needs: build-package
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: packages
path: dist

- name: Make release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: |
dist/*.tar.gz
Expand All @@ -59,15 +59,15 @@ jobs:
pypi-publish:
name: Publish on PyPI
needs: github-release
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
environment:
name: pypi
url: https://pypi.org/p/qldebugger
permissions:
id-token: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: packages
path: dist
Expand Down

0 comments on commit bc21d97

Please sign in to comment.