Skip to content

chore(examples): improved web-wa-sqlite example #893

chore(examples): improved web-wa-sqlite example

chore(examples): improved web-wa-sqlite example #893

Workflow file for this run

name: E2E
on:
push:
branches:
- main
pull_request:
paths-ignore:
# Root files
- '*'
- '!pnpm-lock.yaml'
# CI files not related to GH actions
- '.buildkite/**'
- '**/README.md'
- 'docs/**'
env:
OTP_VERSION: "25.3"
ELIXIR_VERSION: "1.15"
concurrency:
group: e2e-${{ github.ref }}
cancel-in-progress: true
jobs:
e2e_tests:
name: E2E tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: e2e
env:
BUILDKITE_ANALYTICS_TOKEN: ${{ secrets.BUILDKITE_TEST_ANALYTICS_E2E }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4
- name: Inject variables for `docker buildx` github actions caching
uses: crazy-max/ghaction-github-runtime@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- run: |
echo "ELECTRIC_VERSION=$(make --silent print_version_from_git)" >> $GITHUB_ENV
working-directory: components/electric
- run: make docker-build-ci
env:
ELECTRIC_IMAGE_NAME: electric-sql-ci/electric
working-directory: components/electric
- run: make docker-build-ws-client
env:
ELECTRIC_CLIENT_IMAGE_NAME: electric-sql-ci/electric-ws-client
working-directory: components/electric
- name: Cache built lux
uses: actions/cache@v3
with:
path: |
e2e/lux/bin
e2e/lux/ebin
e2e/lux/priv
key: ${{ runner.os }}-luxbuilt-${{ env.OTP_VERSION }}-${{ env.ELIXIR_VERSION }}
- run: make lux
- run: make deps pull
- run: make test_only
id: tests
env:
ELECTRIC_IMAGE_NAME: electric-sql-ci/electric
ELECTRIC_CLIENT_IMAGE_NAME: electric-sql-ci/electric-ws-client
ELECTRIC_IMAGE_TAG: ${{ env.ELECTRIC_VERSION }}
- name: Upload lux logs
uses: actions/upload-artifact@v3
if: ${{ failure() && steps.tests.outcome == 'failure' }}
with:
name: lux_logs
path: e2e/lux_logs/run_*
- name: Upload test results to Buildkite analytics
if: ${{ !cancelled() && steps.tests.outcome != 'skipped' && env.BUILDKITE_ANALYTICS_TOKEN != '' }}
working-directory: e2e/lux_logs/latest_run
run: |
curl \
-X POST \
--fail-with-body \
-H "Authorization: Token token=\"$BUILDKITE_ANALYTICS_TOKEN\"" \
-F "data=@lux_junit.xml" \
-F "format=junit" \
-F "run_env[CI]=github_actions" \
-F "run_env[key]=$GITHUB_ACTION-$GITHUB_RUN_NUMBER-$GITHUB_RUN_ATTEMPT" \
-F "run_env[number]=$GITHUB_RUN_NUMBER" \
-F "run_env[branch]=$GITHUB_REF" \
-F "run_env[commit_sha]=$GITHUB_SHA" \
-F "run_env[url]=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \
https://analytics-api.buildkite.com/v1/uploads