Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 30 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
continue-on-error: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7
with:
ref: ${{ github.base_ref }}

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: 3.12

Expand All @@ -26,15 +26,15 @@ jobs:
mv coverage.lcov base-coverage.lcov

- name: Upload code coverage for base branch
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: base-coverage.lcov
path: ./base-coverage.lcov

pip_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: pypa/gh-action-pip-audit@v1.1.0
with:
Expand All @@ -47,10 +47,10 @@ jobs:
python: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}

Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
run: pytest

- name: Upload code coverage
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: coverage-${{ matrix.python }}
path: |
Expand All @@ -97,10 +97,10 @@ jobs:
python: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}

Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
needs: [base_coverage, test]
steps:
- name: Download code coverage report
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: coverage-3.12

Expand All @@ -161,7 +161,7 @@ jobs:
- name: Download code coverage report for base branch
id: download-base-coverage
continue-on-error: true
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: base-coverage.lcov

Expand Down Expand Up @@ -198,9 +198,9 @@ jobs:
env:
REF: v3
steps: &test-against-ofm-steps
- uses: actions/checkout@v3
- uses: actions/checkout@v7

- uses: actions/setup-python@v4
- uses: actions/setup-python@v6
with:
python-version: '3.11'

Expand Down Expand Up @@ -238,6 +238,23 @@ jobs:
- name: Run OFM lifecycle test
run: tests/lifecycle_test/testfile.py

- name: Generate OpenAPI and Thing Description.
# Note: we need to move the files into the original
# repo directory, so they're found by the next step.
run: |
mkdir -p ./apidocs/http/
python ./generate_http_api_data.py
mv apidocs ../labthings-fastapi

- name: Upload OpenAPI and Thing Description
uses: actions/upload-artifact@v7
with:
name: api_docs
path: | # Note: this ignores working-directory
apidocs/http/openapi.json
apidocs/http/thing_descriptions.json
if-no-files-found: error

- name: Type check with `mypy`
run: mypy src

Expand Down
Loading