-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
69 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: E2E Tests | ||
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
push: | ||
paths-ignore: | ||
- 'docs/**' | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Go environment | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21.6' | ||
- name: Test backend | ||
uses: magefile/mage-action@v2 | ||
with: | ||
version: latest | ||
args: coverage | ||
- name: Build backend | ||
uses: magefile/mage-action@v2 | ||
with: | ||
version: latest | ||
args: buildAll | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
- name: Install dependencies | ||
run: npm install -g yarn && yarn install --frozen-lockfile; | ||
- name: Spellcheck | ||
run: | | ||
yarn spellcheck; | ||
- name: Build Frontend | ||
run: | | ||
yarn build; | ||
- name: Start the docker container for E2E | ||
run: | | ||
docker-compose pull | ||
docker compose -f docker-compose-debug.yaml up | ||
- name: Wait for grafana to start | ||
uses: nev7n/wait_for_response@v1 | ||
with: | ||
url: 'http://localhost:3099/' | ||
responseCode: 200 | ||
timeout: 20000 | ||
interval: 500 | ||
- name: Install Playwright Browsers | ||
run: yarn playwright install --with-deps | ||
- name: Run E2E tests | ||
run: yarn test:e2e | ||
- name: Run E2E artifacts | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 | ||
- name: Stop the docker container | ||
if: always() | ||
run: docker-compose down |