This repository has been archived by the owner on Feb 14, 2025. It is now read-only.
chore: add LICENSE.md #32
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
name: Test & build | |
on: [pull_request, push] | |
defaults: | |
run: | |
shell: bash | |
env: | |
DOCKER_BUILDKIT: 1 | |
COMPOSE_DOCKER_CLI_BUILD: 1 | |
SHELLOPTS: nounset:pipefail | |
jobs: | |
verify-projen-up-to-date: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/cambridge-collection/tilediiif/dev-environment:v0-tools | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- run: npx projen --no-post | |
- run: > | |
test "$(git status --porcelain)" == "" | |
|| ( | |
echo "Error: Running projen synth produced changes - project is not up-to-date" 1>&2 | |
&& git status --porcelain | |
&& exit 1 | |
) | |
typecheck: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/cambridge-collection/tilediiif/dev-environment:v0-tools | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- run: npx projen ci:setup | |
- run: npx projen typecheck-python | |
continue-on-error: true # types are not yet fully defined | |
lint: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/cambridge-collection/tilediiif/dev-environment:v0-tools | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- run: npx projen ci:setup | |
- run: npx projen format-python-code | |
- run: > | |
test "$(git status --porcelain)" == "" | |
|| ( | |
echo "Error: Running `projen format-python-code` produced changes - committed code has not been auto-formatted" 1>&2 | |
&& git status --porcelain | |
&& exit 1 | |
) | |
test: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/cambridge-collection/tilediiif/dev-environment:v0-tools | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- run: npx projen ci:setup | |
- run: npx projen test |