Skip to content

Improve large sync resumability #50

Improve large sync resumability

Improve large sync resumability #50

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
checks:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Tests
service: ci
command: make test-ci
- name: Build server
service: ci
command: make build-server
- name: go vet
service: ci
command: make vet
- name: Lint Format
service: ci
command: make lint-fmt
- name: staticcheck
service: ci
command: make lint
- name: Verify dependency licenses
service: licensing
command: make license-check
env:
DOCKER_BUILDKIT: "1"
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
- name: Run ${{ matrix.name }}
run: |
docker compose run --rm --build "${{ matrix.service }}" sh -c '
git config --global --add safe.directory "$PWD"
${{ matrix.command }}
'
integration-tests:
name: Integration Tests
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
concurrency:
group: integration-tests-${{ github.repository }}
cancel-in-progress: false
env:
DOCKER_BUILDKIT: "1"
DATABASE_HOST: ${{ secrets.PS_INTEGRATION_DATABASE_HOST }}
DATABASE_NAME: ${{ secrets.PS_INTEGRATION_DATABASE_NAME }}
DATABASE_SHARDED_NAME: ${{ format('{0}_sharded', secrets.PS_INTEGRATION_DATABASE_NAME) }}
DATABASE_SHARDED_REQUIRED: "1"
DATABASE_USERNAME: ${{ secrets.PS_INTEGRATION_DATABASE_USERNAME }}
DATABASE_PASSWORD: ${{ secrets.PS_INTEGRATION_DATABASE_PASSWORD }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
- name: Verify integration secrets
run: |
missing=0
for name in DATABASE_HOST DATABASE_NAME DATABASE_USERNAME DATABASE_PASSWORD; do
if [ -z "${!name}" ]; then
echo "::error::$name is not configured"
missing=1
fi
done
exit "$missing"
- name: Run integration tests
run: |
docker compose run --rm --build \
-e DATABASE_HOST \
-e DATABASE_NAME \
-e DATABASE_SHARDED_NAME \
-e DATABASE_SHARDED_REQUIRED \
-e DATABASE_USERNAME \
-e DATABASE_PASSWORD \
ci sh -c '
git config --global --add safe.directory "$PWD"
make test-integration-stress
'