Skip to content

Commit

Permalink
Merge pull request #310 from corenting/chore/ci
Browse files Browse the repository at this point in the history
chore(ci): CI updates
  • Loading branch information
corenting authored Mar 6, 2024
2 parents a644705 + 4614dd9 commit 405e337
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 35 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.9", "pypy3.10"]
python-version:
["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.9", "pypy3.10"]
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -42,18 +43,28 @@ jobs:
run: make style
- name: Test
run: make test
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- name: Codecov
uses: codecov/codecov-action@v4
with:
flags: ${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}
code_scanning:
name: Code scanning
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: python
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
release:
name: Release on PyPI
runs-on: ubuntu-latest
environment: release
needs: ci
needs: [ci, code_scanning]
if: startsWith(github.ref, 'refs/tags/v')
permissions:
id-token: write
Expand Down
60 changes: 29 additions & 31 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,35 @@ jobs:
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: "poetry"
- name: Setup environment
run: poetry install
- name: Build HTML
run: poetry run sphinx-build -M html docs docs/build
- name: Upload artifacts
uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html/
- name: Checkout code
uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: "poetry"
- name: Setup environment
run: poetry install
- name: Build HTML
run: poetry run sphinx-build -M html docs docs/build
- name: Upload artifacts
uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html/
deploy:
name: Deploy documentation
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
name: Deploy documentation
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or the latest "vX.X.X" version tag for this action


uses: actions/deploy-pages@v4

0 comments on commit 405e337

Please sign in to comment.