Push Docker
image to https://ghcr.io
#26
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 | |
on: | |
push: | |
branches: | |
- '**' | |
defaults: | |
run: | |
working-directory: ./web | |
jobs: | |
test: | |
timeout-minutes: 60 | |
runs-on: ubuntu-22.04 | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.x | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: 1.0.35 | |
- | |
name: Setup end-to-end testing | |
run: make test_e2e_setup | |
- | |
name: Wait for the apps in docker healthy | |
run: timeout 60s sh -c 'until docker ps | grep rss-bookmarkr-web | grep -q healthy; do echo "Waiting for container to be healthy..."; sleep 2; done' | |
- | |
name: Restore dotnet tool & dependency | |
run: | | |
dotnet tool restore | |
dotnet restore | |
dotnet paket restore | |
- | |
name: Run unit test for Server project | |
run: make test_unit_server | |
- | |
name: Migrate database schema | |
run: | | |
mv migrondi.e2e.json migrondi.json | |
make migrate_up | |
- | |
name: Install dependencies | |
run: bun install --frozen-lockfile | |
- | |
name: Install Playwright Browsers | |
run: | | |
bunx playwright install | |
bunx playwright install-deps | |
- | |
name: Run Playwright tests | |
run: PAGE_URL=http://localhost:8080 bunx playwright test --reporter list | |
- | |
name: Teardown end-to-end testing | |
if: always() | |
run: make test_e2e_teardown |