experimental PR checking some stuff on CI #13
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: Playwright tests and docker push | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '*' | |
env: | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
jobs: | |
test-and-push: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Login to GHCR (GitHub Packages) | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build docker images | |
run: ./docker/build && ./docker/db-migrate/build && ./db/scripts/build | |
- name: Push SHA tag | |
run: ./docker/push && ./docker/db-migrate/push && ./db/scripts/push | |
- name: Run service dependencies | |
run: scripts/run-dependencies | |
- name: Run app in docker | |
run: ./docker/run | |
- name: log check | |
# TODO: remove this! | |
run: docker logs daedalus-web-app | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: npm | |
- name: Install npm dependencies | |
run: npm ci | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps && npx playwright install msedge | |
- name: Run Playwright tests | |
run: npm run test:e2e | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 | |
- name: Push branch tag on success | |
run: ./docker/push-branch-tag |