Skip to content

test(apps): fix dashboard/voucher/consent tests #18

test(apps): fix dashboard/voucher/consent tests

test(apps): fix dashboard/voucher/consent tests #18

Workflow file for this run

name: "E2e test"
on:
pull_request:
branches: [main]
jobs:
build:
name: parallel buck2 builds
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
target:
- //core/api
- //core/api-ws-server
- //core/api-trigger
- //core/api-exporter
- //apps/dashboard
- //apps/consent
- //apps/pay
- //apps/admin-panel
- //apps/map
- //apps/voucher
- //core/api-keys
- //core/notifications
- //bats/helpers/callback:run
- //bats/helpers/subscriber:run
- //bats/helpers/totp:generate
fail-fast: false
steps:
- id: vars
run: echo "short_sha=${GITHUB_SHA:0:7}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v14
- name: Run the Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Build
run: |
nix develop -c buck2 build ${{ matrix.target }}
- uses: actions/cache/save@v4
with:
path: |
~/.buck2
buck-out
.buck-cache
prebuilt
installed
target
.buckd
buck-out/cache
key: b2-${{ matrix.target }}-${{ env.short_sha }}
enableCrossOsArchive: true
tests:
name: execute via bats
runs-on: ubuntu-latest
timeout-minutes: 25
needs: build
steps:
- id: vars
run: echo "short_sha=${GITHUB_SHA:0:7}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v14
- name: Run the Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v8
- uses: actions/cache/restore@v4
with:
path: |
~/.buck2
buck-out
.buck-cache
prebuilt
installed
target
.buckd
buck-out/cache
key: |
b2-//core/api-${{ env.short_sha }}
b2-//core/api-ws-server-${{ env.short_sha }}
b2-//core/api-trigger-${{ env.short_sha }}
b2-//core/api-exporter-${{ env.short_sha }}
b2-//apps/dashboard-${{ env.short_sha }}
b2-//apps/consent-${{ env.short_sha }}
b2-//apps/pay-${{ env.short_sha }}
b2-//apps/admin-panel-${{ env.short_sha }}
b2-//apps/map-${{ env.short_sha }}
b2-//apps/voucher-${{ env.short_sha }}
b2-//core/api-keys-${{ env.short_sha }}
b2-//core/notifications-${{ env.short_sha }}
b2-//bats/helpers/callback:run-${{ env.short_sha }}
b2-//bats/helpers/subscriber:run-${{ env.short_sha }}
b2-//bats/helpers/totp:generate-${{ env.short_sha }}
restore-keys: |
buck2-${{ runner.os }}-
fail-on-cache-miss: true
- name: Run bats tests
run: |
nix develop -c buck2 build //core/api \
//core/api-ws-server \
//core/api-trigger \
//core/api-exporter \
//apps/dashboard \
//apps/consent \
//apps/pay \
//apps/admin-panel \
//apps/map \
//apps/voucher \
//core/api-keys \
//core/notifications \
//bats/helpers/callback:run \
//bats/helpers/subscriber:run \
//bats/helpers/totp:generate
nix develop -c bats --setup-suite-file bats/ci_setup_suite.bash -t bats/core/**
- name: Rename Tilt log
if: always()
run: mv bats/.e2e-tilt.log bats/e2e-tilt.log
- name: Upload Tilt log
if: always()
uses: actions/upload-artifact@v4
with:
name: Tilt log
path: bats/e2e-tilt.log