This repository has been archived by the owner on Dec 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
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
46 changed files
with
1,573 additions
and
999 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 |
---|---|---|
|
@@ -4,3 +4,5 @@ node_modules | |
dist | ||
dist-firefox | ||
artifacts | ||
results | ||
seccomp_profile.json |
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: Playwright Tests | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
playwright: | ||
name: "Playwright Tests" | ||
if: false # disable for now | ||
runs-on: ubuntu-latest | ||
container: | ||
# make sure to match this version to what's in package.json | ||
image: mcr.microsoft.com/playwright:v1.40.1-jammy | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8.15.1 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 21 | ||
cache: 'pnpm' | ||
- name: Install project dependencies | ||
run: pnpm install | ||
- name: Install test dependencies | ||
run: pnpm test:deps | ||
- name: Build in prod mode | ||
run: pnpm build | ||
- name: Run the test suite against Chromium | ||
run: pnpm test | ||
env: | ||
HOME: /root | ||
CI: true | ||
E2E_SHACKLI: ${{ secrets.E2E_SHACKLI }} | ||
- name: Upload test report | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: test-report | ||
path: results/* |
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,25 +1,16 @@ | ||
.idea* | ||
node_modules | ||
coverage-ts | ||
dist | ||
dist-chrome | ||
dist-firefox | ||
artifacts | ||
# make sure to use --id option when signing! | ||
.web-extension-id | ||
Session.vim | ||
dist.crx | ||
dist.pem | ||
tsconfig.tsbuildinfo | ||
mochawesome-report | ||
/cypress/screenshots/ | ||
/cypress/fixtures/_shack_li_.txt | ||
debug.log | ||
.DS_Store | ||
.envrc | ||
.env | ||
.direnv | ||
/test-results/ | ||
/playwright-report/ | ||
/playwright/.cache/ | ||
results | ||
_shack_li_.json |
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,20 @@ | ||
# Pull the base image | ||
FROM mcr.microsoft.com/playwright:v1.40.1-jammy | ||
|
||
ARG SCOOKIE | ||
ARG CI | ||
|
||
ENV CI=$CI | ||
ENV E2E_SHACKLI=$SCOOKIE | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable | ||
|
||
WORKDIR /code/ | ||
COPY . /code/ | ||
|
||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile | ||
RUN pnpm test:deps | ||
RUN pnpm build | ||
|
||
CMD ["/bin/bash"] |
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
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 |
---|---|---|
@@ -1,47 +1,30 @@ | ||
import { defineConfig, devices } from "@playwright/test"; | ||
|
||
/** | ||
* Read environment variables from file. | ||
* https://github.com/motdotla/dotenv | ||
*/ | ||
// require('dotenv').config(); | ||
|
||
/** | ||
* See https://playwright.dev/docs/test-configuration. | ||
*/ | ||
export default defineConfig({ | ||
testDir: "./tests/e2e", | ||
/* Run tests in files in parallel */ | ||
fullyParallel: true, | ||
/* Fail the build on CI if you accidentally left test.only in the source code. */ | ||
forbidOnly: !!process.env.CI, | ||
retries: process.env.CI ? 0 : 1, | ||
/* Opt out of parallel tests on CI */ | ||
workers: process.env.CI ? 1 : 2, | ||
workers: process.env.CI ? 2 : 4, | ||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */ | ||
reporter: [["html"], ["list"]], | ||
reporter: [ | ||
["list", { printSteps: true, outputFolder: "results/reports" }], | ||
["html", { open: "never", outputFolder: "results/reports" }], | ||
], | ||
outputDir: "results/tests", | ||
|
||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ | ||
use: { | ||
/* Base URL to use in actions like `await page.goto('/')`. */ | ||
// baseURL: 'http://127.0.0.1:3000', | ||
screenshot: "only-on-failure", | ||
trace: "retain-on-failure", | ||
video: "retain-on-failure", | ||
headless: true, | ||
}, | ||
|
||
/* Configure projects for major browsers */ | ||
projects: [ | ||
{ | ||
name: "chromium", | ||
use: { ...devices["Desktop Chrome"] }, | ||
}, | ||
], | ||
|
||
/* Run your local dev server before starting the tests */ | ||
// webServer: { | ||
// command: 'npm run start', | ||
// url: 'http://127.0.0.1:3000', | ||
// reuseExistingServer: !process.env.CI, | ||
// }, | ||
}); |
Oops, something went wrong.