-
Notifications
You must be signed in to change notification settings - Fork 5
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
32 changed files
with
2,608 additions
and
1,269 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,2 @@ | ||
liberapay: janw | ||
ko_fi: janwxyz |
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,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: pip | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
labels: | ||
- dependencies | ||
commit-message: | ||
prefix: "build(deps)" |
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,57 @@ | ||
name: Docker Build | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "main" | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
docker-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get python version from file | ||
run: echo "PYTHON_VERSION=$(cat .python-version)" | tee -a "$GITHUB_ENV" | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: "ghcr.io/${{ github.repository }}" | ||
tags: | | ||
type=ref,event=pr | ||
type=semver,pattern=v{{major}} | ||
type=semver,pattern=v{{major}}.{{minor}} | ||
type=semver,pattern=v{{version}} | ||
type=raw,value=edge,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Github Container Registry | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
platforms: linux/amd64 # TODO: add `linux/arm64/v8` | ||
build-args: | | ||
PYTHON_VERSION=${{ env.PYTHON_VERSION }} | ||
- name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -4,10 +4,45 @@ on: | |
pull_request: | ||
|
||
jobs: | ||
gitlint: | ||
uses: janw/workflows/.github/workflows/gitlint.yaml@main | ||
with: | ||
first-commit: abb56f5 | ||
commitizen: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
sparse-checkout: | | ||
pyproject.toml | ||
sparse-checkout-cone-mode: false | ||
|
||
pre-commit: | ||
uses: janw/workflows/.github/workflows/pre-commit.yaml@main | ||
- name: Install commitizen | ||
run: pipx install commitizen | ||
|
||
- run: cz check --rev-range origin/main..HEAD | ||
shell: bash | ||
|
||
# pre-commit-extras: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Check out | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Get python version from file | ||
# run: echo "PYTHON_VERSION=$(cat .python-version)" | tee -a "$GITHUB_ENV" | ||
|
||
# - name: Install commitizen | ||
# run: pipx install poetry | ||
|
||
# - name: Set up python | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: ${{ env.PYTHON_VERSION }} | ||
# cache: 'poetry' | ||
|
||
# - run: poetry install --with=dev | ||
|
||
# - uses: pre-commit/[email protected] | ||
# with: | ||
# extra_args: > | ||
# rich-codex | ||
# --all-files |
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,39 @@ | ||
name: Tests | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "main" | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
pytest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get python version from file | ||
run: echo "PYTHON_VERSION=$(cat .python-version)" | tee -a "$GITHUB_ENV" | ||
|
||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- name: Set up python environment | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
cache: 'poetry' | ||
|
||
- run: poetry install --no-root --with=tests --sync | ||
|
||
- run: poetry run pytest --cov-report=xml | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./coverage.xml | ||
name: coverage-${{ matrix.python-version }} |
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,47 +1,34 @@ | ||
ci: | ||
autofix_prs: false | ||
autoupdate_schedule: quarterly | ||
autoupdate_commit_msg: 'build(deps): [pre-commit.ci] pre-commit autoupdate' | ||
|
||
exclude: > | ||
(?x)^( | ||
.+\.svg| | ||
.+/migrations/.+| | ||
.+/fixtures/.+| | ||
.+/cassettes/.+ | ||
)$ | ||
repos: | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: 'v0.0.267' | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: 'v0.1.14' | ||
hooks: | ||
- id: ruff | ||
args: [ --fix, --exit-non-zero-on-fix ] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: "23.3.0" | ||
hooks: | ||
- id: black | ||
|
||
- repo: local | ||
hooks: | ||
- id: python-no-print | ||
name: check for print() | ||
description: 'A quick check for the `print()` built-in function' | ||
entry: '\bprint\(' | ||
language: pygrep | ||
types: [python] | ||
|
||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: 'v1.10.0' | ||
hooks: | ||
- id: python-check-blanket-noqa | ||
- id: python-no-eval | ||
- id: ruff-format | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: 'v4.4.0' | ||
rev: 'v4.5.0' | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-builtin-literals | ||
- id: check-executables-have-shebangs | ||
- id: check-shebang-scripts-are-executable | ||
|
||
- repo: https://github.com/python-poetry/poetry | ||
rev: '1.4.2' | ||
rev: '1.7.1' | ||
hooks: | ||
- id: poetry-check | ||
- id: poetry-lock | ||
- id: poetry-export |
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 @@ | ||
3.12 |
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,5 +1,7 @@ | ||
# syntax=docker/dockerfile:1 | ||
ARG PYTHON_VERSION | ||
|
||
FROM node:16 as frontend | ||
LABEL maintainer="Jan Willhaus <[email protected]" | ||
|
||
WORKDIR /frontend | ||
COPY package-lock.json package.json ./ | ||
|
@@ -9,7 +11,7 @@ COPY vite.config.js ./ | |
COPY frontend ./frontend | ||
RUN npm run build | ||
|
||
FROM python:3.7-alpine | ||
FROM python:${PYTHON_VERSION}-alpine | ||
ENV PIP_NO_CACHE_DIR off | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
|
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
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,6 +1,6 @@ | ||
{ | ||
"name": "tapedrive", | ||
"version": "0.2.0", | ||
"version": "0.1.0", | ||
"description": "A self-hostable podcast client with built-in archiving features.", | ||
"main": "assets/dist/bundles/main.js", | ||
"repository": "[email protected]:janw/tapedrive.git", | ||
|
Oops, something went wrong.