-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* include dist files * add a frontend browser test
- Loading branch information
1 parent
110993c
commit 66b1b88
Showing
5 changed files
with
57 additions
and
13 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,40 @@ | ||
name: Docker UI | ||
on: | ||
pull_request: | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build Docker container | ||
run: docker build -t ui-app . | ||
|
||
- name: Start Docker container | ||
env: | ||
HOST: 0.0.0.0 | ||
PORT: 8000 | ||
run: | | ||
docker run -d -e HOST -e PORT -p 8000:8000 --name ui ui-app | ||
sleep 5 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Debug | ||
run: curl -v http://localhost:8000 | ||
|
||
- name: Setup npm | ||
run: npm init -y | ||
|
||
- name: Install Playwright | ||
run: npm install @playwright/test | ||
|
||
- name: Install Playwright Browsers | ||
run: npx playwright install chromium --with-deps | ||
|
||
- name: Run Playwright tests | ||
run: npx playwright test | ||
|
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 |
---|---|---|
@@ -1,34 +1,25 @@ | ||
name: Go Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Set up Go | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
- | ||
name: Run GoReleaser | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
# either 'goreleaser' (default) or 'goreleaser-pro' | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution | ||
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} |
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 |
---|---|---|
|
@@ -25,7 +25,8 @@ | |
|
||
!config.yaml | ||
!sample.env | ||
!dist/** | ||
!docs/** | ||
!tests/** | ||
!cmd/reaper/dist/** | ||
!tls/* | ||
|
||
|
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
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,11 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test('sign in button', async ({ page }) => { | ||
await page.goto('http://localhost:8000'); | ||
|
||
// Click the sign in button. | ||
await page.getByRole('button', { name: 'Sign in' }).click(); | ||
|
||
// Expects page to have a heading with Scan title. | ||
await expect(page.getByRole('heading', { name: 'Scan' })).toBeVisible(); | ||
}); |