Skip to content
Merged
Show file tree
Hide file tree
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
93 changes: 0 additions & 93 deletions .github/workflows/build.yml

This file was deleted.

114 changes: 114 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
#
# Perform a regular build on any branch except main

name: build

on:
push:
pull_request:
types: [opened, synchronize]

jobs:
# Prepare the build
prep:
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
abort: ${{ steps.debounce.outputs.abort }}
version: ${{ steps.version.outputs.version }}
steps:
- name: Abort building on push with open PR
id: debounce
uses: MrMatAP/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Version the project
id: version
uses: MrMatAP/[email protected]
with:
ecosystem: python
major: 1
minor: 1

# A regular project build. Test results will explicitly be reported during a pull request build
build:
runs-on: ubuntu-latest
needs: prep
if: ${{ needs.prep.outputs.abort != 'true' }}
permissions:
contents: read
pull-requests: write
checks: write
env:
MRMAT_VERSION: ${{ needs.prep.outputs.version }}
steps:
- name: Checkout out our code
uses: actions/[email protected]
- name: Set up uv and Python
uses: astral-sh/[email protected]
with:
enable-cache: true
python-version: 3.13.7
- name: Lint
run: uv run --frozen mypy --no-incremental --junit-xml=${GITHUB_WORKSPACE}/build/lint.xml ${GITHUB_WORKSPACE}/src/mrmat_python_api_fastapi || true
- name: Build
run: uv build --wheel
- name: Test
run: uv run --frozen pytest --junit-xml=${GITHUB_WORKSPACE}/build/junit.xml --cov-report=xml:${GITHUB_WORKSPACE}/build/coverage.xml
- name: Upload linting results
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v4
with:
name: Lint Results
path: build/lint.xml
retention-days: 1
- name: Upload unit test results
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v4
with:
name: Unit Test Results
path: build/junit.xml
retention-days: 1
- name: Upload coverage results
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v4
with:
name: Coverage Results
path: build/coverage.xml
retention-days: 1
- name: Report on unit tests
if: ${{ github.event_name == 'pull_request' }}
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: "Unit Tests"
comment_title: "Unit Test Results"
files: build/junit.xml
- name: Report on code coverage
if: ${{ github.event_name == 'pull_request' }}
uses: irongut/[email protected]
with:
filename: build/coverage.xml

# The release job only executes when pushing to the main branch
release:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
permissions:
contents: write
needs:
- prep
- build
steps:
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.prep.outputs.version }}
release_name: Release ${{ needs.prep.outputs.version }}
body: |
Release ${{ needs.prep.outputs.version }}
draft: false
prerelease: false
6 changes: 6 additions & 0 deletions .idea/copyright/MIT.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions .idea/mrmat-python-api-fastapi.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/runConfigurations/build.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions .idea/runConfigurations/lint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .idea/runConfigurations/run.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions .idea/runConfigurations/test.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CLUSTER_NAME := $(shell hostname -s)
# Can be either 'istio-sidecar' or 'istio-ambient'
MESH := istio-ambient
# Can be 'ingress', 'gateway-api' or 'istio'
EDGE := gateway-api
EDGE := istio

# How the container then connects to its datastore
API_DB_URL="sqlite:////data/db.sqlite3"
Expand Down
Loading