diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..9a5e054 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,26 @@ +name: Docker CI +on: [push] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: docker/setup-buildx-action@v1 + - uses: actions/cache@v4 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + - uses: docker/build-push-action@v2 + with: + context: ./ + file: ./Dockerfile + builder: ${{ steps.buildx.outputs.name }} + push: false + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new + - run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + - run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/.github/workflows/pythonci.yml b/.github/workflows/pythonci.yml new file mode 100644 index 0000000..14f044d --- /dev/null +++ b/.github/workflows/pythonci.yml @@ -0,0 +1,37 @@ +name: Python CI +on: [push] +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: astral-sh/ruff-action@v3 + + ruff-format-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: astral-sh/ruff-action@v3 + with: + args: "format --check --diff" + + ty: + runs-on: ubuntu-latest + steps: + - run: python3 -m pip install uv + - uses: actions/checkout@v5 + - run: python3 -m uv sync + - run: python3 -m uv run ty check --output-format github + + coverage: + runs-on: ubuntu-latest + steps: + - run: python3 -m pip install uv + - uses: actions/checkout@v5 + - run: python3 -m uv sync + - run: python3 -m uv run coverage run -m unittest -v + - run: python3 -m uv run coverage xml + - uses: irongut/CodeCoverageSummary@v1.3.0 + with: + filename: coverage.xml + diff --git a/README.md b/README.md index 7b2235b..e65b785 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ curl -X DELETE \ - [x] 403 PUT on host already taken - [x] remove dot files after file extract - [x] unit tests -- [ ] github actions +- [x] github actions - [ ] X-Redirect - [ ] X-Proxy - [ ] proper doc