-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: pipeline | ||
name: Pipeline | ||
|
||
on: | ||
push: | ||
|
@@ -86,6 +86,68 @@ jobs: | |
with: | ||
sarif_file: semgrep.sarif | ||
|
||
test: | ||
name: Test | ||
permissions: | ||
id-token: write | ||
runs-on: ubuntu-24.04 | ||
needs: | ||
- init | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# Run all test suites | ||
step: | ||
- static | ||
# TODO: Enable unit tests (Azure login and config file required) | ||
# - unit | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Set up uv | ||
uses: astral-sh/[email protected] | ||
with: | ||
enable-cache: true | ||
python-version: "3.12" | ||
version: "0.5.x" | ||
|
||
# - name: Login to Azure | ||
# uses: Azure/[email protected] | ||
# with: | ||
# client-id: ${{ secrets.AZURE_CLIENT_ID }} | ||
# subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | ||
# tenant-id: ${{ secrets.AZURE_TENANT_ID }} | ||
|
||
- name: Cache pytest | ||
uses: actions/[email protected] | ||
with: | ||
key: pytest-${{ github.head_ref || github.ref_name }}-${{ hashFiles('requirements-dev.txt') }} | ||
path: .pytest_cache | ||
|
||
- name: Cache Ruff | ||
uses: actions/[email protected] | ||
with: | ||
key: ruff-${{ github.head_ref || github.ref_name }}-${{ hashFiles('requirements-dev.txt') }} | ||
path: .ruff_cache | ||
|
||
- name: Set up dependencies | ||
run: make install-deps | ||
|
||
# - name: Configure environment variables | ||
# run: echo "${{ secrets.DOTENV_UNIT_TESTS }}" > .env | ||
|
||
- name: Run tests | ||
run: make test-${{ matrix.step }} version_full=${{ needs.init.outputs.VERSION_FULL }} | ||
|
||
- name: Upload artifacts | ||
uses: actions/[email protected] | ||
if: always() | ||
with: | ||
compression-level: 9 | ||
name: test-${{ matrix.step }} | ||
path: test-reports/* | ||
|
||
build-image: | ||
name: Build & publish image | ||
needs: | ||
|
@@ -168,8 +230,9 @@ jobs: | |
create-release: | ||
name: Create release | ||
needs: | ||
- init | ||
- build-image | ||
- init | ||
- test | ||
permissions: | ||
# Allow to create releases | ||
contents: write | ||
|
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