Skip to content

feat: added github action for anvil-catalog (#3638) #4017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

39 changes: 39 additions & 0 deletions .github/workflows/run-playwright-tests-anvil-catalog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Playwright Tests anvil-catalog
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20.10.0"
- name: Install dependencies
run: |
cd explorer
npm ci
- name: Install Playwright Browsers
run: |
cd explorer
npx playwright install --with-deps
- name: Build AnVIL-catalog database
run: |
cd ./explorer/files
npm ci
mkdir ./anvil-catalog/out
npm run build-anvil-db
- name: Run Playwright tests
run: |
cd explorer
npm run test:anvil-catalog
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: explorer/playwright-report/
retention-days: 30
3 changes: 0 additions & 3 deletions explorer/e2e/anvil-catalog/anvilcatalog-sort.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,18 @@ import { anvilcatalogTabs } from "./anvilcatalog-tabs";

test.describe.configure({ mode: "parallel" });

test.setTimeout(120000);
test("On the Consortia tab, expect clicking the column header (the sort button) to keep the first element of the column visible", async ({
page,
}) => {
await testSortCatalog(page, anvilcatalogTabs.consortia);
});

test.setTimeout(120000);
test("On the Studies tab, expect clicking the column header (the sort button) to keep the first element of the column visible", async ({
page,
}) => {
await testSortCatalog(page, anvilcatalogTabs.studies);
});

test.setTimeout(120000);
test("On the Workspaces tab, expect clicking the column header (the sort button) to keep the first element of the column visible", async ({
page,
}) => {
Expand Down
7 changes: 4 additions & 3 deletions explorer/playwright_anvil-catalog.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { devices } from "@playwright/test";

const config: PlaywrightTestConfig = {
expect: {
timeout: 20 * 1000,
timeout: 15 * 1000,
},
outputDir: "playwright-report/",
projects: [
Expand All @@ -27,9 +27,10 @@ const config: PlaywrightTestConfig = {
screenshot: "only-on-failure",
},
webServer: {
command: "npm run dev:anvil-catalog",
command:
"npm run build-dev:anvil-catalog && mv ./out/ ./out_temp && mkdir ./out && mv ./out_temp ./out/data && npm start",
reuseExistingServer: !process.env.CI,
timeout: 120 * 1000,
timeout: 240 * 1000,
url: "http://localhost:3000/data",
},
};
Expand Down
Loading