-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit d42ebf9
Showing
63 changed files
with
7,005 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
branches: ["main"] | ||
inputs: | ||
prerelease: | ||
description: "Set as prerelease {alpha,beta,rc} choose type of prerelease" | ||
type: choice | ||
default: "" | ||
options: | ||
- alpha | ||
- beta | ||
- rc | ||
- "" | ||
jobs: | ||
bump-version: | ||
if: "!startsWith(github.event.head_commit.message, 'bump:')" | ||
runs-on: ubuntu-latest | ||
name: "Bump version and create changelog with commitizen" | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
with: | ||
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}" | ||
fetch-depth: 0 | ||
- name: Create bump and changelog | ||
uses: commitizen-tools/commitizen-action@master | ||
with: | ||
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
changelog_increment_filename: body.md | ||
prerelease: ${{ inputs.prerelease }} | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body_path: "body.md" | ||
tag_name: ${{ env.REVISION }} | ||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN_CLASSIC }} |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Docker build | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: ["*.*.*"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: ghcr.io/${{ github.actor }}/csp0:${{ github.ref_name }} |
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction --no-root | ||
- name: Run Ruff | ||
run: poetry run ruff check . | ||
- name: Run Mypy | ||
run: poetry run mypy app | ||
- name: Test with pytest | ||
run: poetry run pytest --cov=app --cov-report=xml | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
Oops, something went wrong.