2022-11-02 12:26:57 +00:00
|
|
|
name: Test
|
|
|
|
|
2022-07-19 12:12:51 +00:00
|
|
|
on:
|
2022-11-02 12:26:57 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2022-07-19 12:12:51 +00:00
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
2022-11-02 12:29:19 +00:00
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
with:
|
|
|
|
install: true
|
|
|
|
- name: Build and push
|
|
|
|
id: docker_build
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
push: false
|
2022-07-19 12:12:51 +00:00
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
redis:
|
|
|
|
image: redis:7-alpine
|
|
|
|
ports:
|
|
|
|
- 6379:6379
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: "16"
|
|
|
|
- uses: pnpm/action-setup@v2
|
|
|
|
with:
|
|
|
|
version: 7
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2022-11-02 12:26:57 +00:00
|
|
|
toolchain: 1.64
|
2022-07-19 12:12:51 +00:00
|
|
|
- name: Prepare
|
|
|
|
run: |
|
|
|
|
pnpm install
|
2022-10-07 19:28:25 +00:00
|
|
|
pnpm run test:prepare
|
2022-07-19 12:12:51 +00:00
|
|
|
- name: Install Playwright
|
|
|
|
run: npx playwright install --with-deps
|
|
|
|
- name: Run your tests
|
2022-10-07 19:28:25 +00:00
|
|
|
run: pnpm run test:run
|
2022-07-19 12:12:51 +00:00
|
|
|
- name: Upload test results
|
|
|
|
if: always()
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2022-10-07 19:28:25 +00:00
|
|
|
name: test-results
|
|
|
|
path: test-results
|