dependencies: update dependencies #467
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🔎 continuous integration | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
id-token: write | |
contents: write | |
actions: write | |
pull-requests: write | |
pages: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ci: | |
name: continuous integration | |
runs-on: public-ledgerhq-shared-small | |
timeout-minutes: 60 | |
steps: | |
- name: Checkout | |
timeout-minutes: 10 | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: "recursive" | |
- name: Pull request | Add labels | |
timeout-minutes: 30 | |
if: github.event_name == 'pull_request' | |
uses: actions/labeler@v5 | |
- name: Pull request | Enforce labels | |
timeout-minutes: 5 | |
if: github.event_name == 'pull_request' | |
uses: mheap/github-action-required-labels@v5 | |
with: | |
mode: minimum | |
count: 1 | |
labels: | | |
documentation | |
ci | |
sources | |
dependencies | |
submodules | |
add_comment: true | |
- name: Get API keys | |
timeout-minutes: 10 | |
shell: bash | |
run: | | |
cat << EOF | jq -r 'to_entries[] | select(.key|endswith("_API_KEY")) | "\(.key)=\(.value)"' >> "$GITHUB_ENV" | |
${{ toJSON(secrets) }} | |
EOF | |
- name: Setup pre-commit cache | |
timeout-minutes: 10 | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Setup python / PDM | |
timeout-minutes: 10 | |
uses: ./.github/actions/pdm | |
- name: Install dependencies | |
timeout-minutes: 10 | |
run: pdm install --dev --check --frozen-lockfile | |
- name: Lint | |
timeout-minutes: 10 | |
run: pdm run lint | |
env: | |
PRE_COMMIT_COLOR: always | |
- name: Test | |
timeout-minutes: 20 | |
run: pdm run test | |
- name: Publish test reports | |
timeout-minutes: 10 | |
if: ${{ !cancelled() }} | |
uses: pmeier/pytest-results-action@v0.7.1 | |
with: | |
path: tests/.tests.xml | |
title: Test results | |
summary: true | |
display-options: fEX | |
fail-on-empty: false | |
- name: Setup docs cache | |
timeout-minutes: 10 | |
if: ${{ !cancelled() }} | |
uses: actions/cache@v4 | |
with: | |
path: docs/build | |
key: docs-cache-${{ hashFiles('docs') }} | |
- name: Build docs | |
timeout-minutes: 10 | |
if: ${{ !cancelled() }} | |
run: pdm run docs | |
- name: Setup Github Pages | |
timeout-minutes: 10 | |
if: ${{ !cancelled() && github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
uses: actions/configure-pages@v5 | |
- name: Upload docs to Github Pages | |
timeout-minutes: 10 | |
if: ${{ !cancelled() && github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './docs/build' | |
- name: Deploy GitHub Pages | |
timeout-minutes: 10 | |
if: ${{ !cancelled() && github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
uses: actions/deploy-pages@v4 |