- build: add makefile, dockerfile, ci and development stack - feat(config): add environment configuration and logger - feat(server): add server lifecycle with health and version routes - feat(db): add connection, contract check, migrations and stores - feat(cli): add command dispatch and user management - test(db): add integration tests against mysql
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
schedule:
|
|
- cron: '23 4 * * 1'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: coredns-web-ui-test
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
- name: Format, vet, staticcheck and race tests
|
|
run: |
|
|
set -eu
|
|
docker build --pull --target test -f dockerfile .
|
|
- name: Integration tests against MySQL
|
|
run: |
|
|
set -eu
|
|
IT_ID="${GITHUB_RUN_ID}" scripts/integration.sh
|
|
- name: Image and end-to-end tests
|
|
run: |
|
|
set -eu
|
|
commit=${GITHUB_SHA:0:12}
|
|
version="0.0.0-main.${commit}"
|
|
image="coredns-web-ui:test-${GITHUB_RUN_ID}"
|
|
trap 'docker image rm -f "$image" >/dev/null 2>&1 || true' EXIT
|
|
docker build --build-arg APP_VERSION="$version" --build-arg COMMIT_ID="$commit" -f dockerfile -t "$image" .
|
|
scripts/test-image.sh "$image" "$version" "$commit"
|
|
scripts/test-e2e.sh "$image"
|