Skip to content

Commit

Permalink
chore: fix failing CI (#4082)
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker authored Oct 8, 2024
1 parent ce50529 commit 31fa019
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 27 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
visual-test:
name: Run visual e2e-tests

runs-on: macos-latest
runs-on: macos-15

timeout-minutes: 40

Expand All @@ -49,12 +49,12 @@ jobs:
persist-credentials: false

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'

- name: Use yarn cache
uses: actions/cache@v3
uses: actions/cache@v4
id: yarn-cache
with:
path: ./.yarn/cache
Expand All @@ -65,7 +65,7 @@ jobs:
run: yarn install --immutable

- name: Use Playwright cache
uses: actions/cache@v3
uses: actions/cache@v4
id: playwright-cache
with:
path: |
Expand All @@ -86,15 +86,13 @@ jobs:
if: env.RUN_POST_BUILD == 'true'
run: yarn workspace @dnb/eufemia postbuild:ci

# restore-keys: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-gatsby-

- name: Build portal
run: yarn workspace dnb-design-system-portal build:visual-test

- name: Run visual tests
run: yarn workspace dnb-design-system-portal test:screenshots:ci

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: visual-test-artifact
Expand Down Expand Up @@ -130,12 +128,12 @@ jobs:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'

- name: Use node_modules cache
uses: actions/cache@v3
uses: actions/cache@v4
id: modules-cache
with:
path: '**/node_modules'
Expand All @@ -146,7 +144,7 @@ jobs:
run: yarn install --immutable

- name: Use Playwright cache
uses: actions/cache@v3
uses: actions/cache@v4
id: playwright-cache
with:
path: |
Expand Down Expand Up @@ -175,7 +173,7 @@ jobs:
run: yarn workspace @dnb/eufemia test:e2e:ci

- name: Store Playwright artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-develop-artifact
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/icons-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ jobs:
persist-credentials: false

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'

- name: Use node_modules cache
uses: actions/cache@v3
uses: actions/cache@v4
id: modules-cache
with:
path: '**/node_modules'
Expand All @@ -64,7 +64,7 @@ jobs:
run: yarn workspace dnb-design-system-portal build:visual-test

- name: Store portal artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: portal-build-artifact
path: ./packages/dnb-design-system-portal/public
Expand All @@ -87,12 +87,12 @@ jobs:
persist-credentials: false

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'

- name: Use yarn cache
uses: actions/cache@v3
uses: actions/cache@v4
id: yarn-cache
with:
path: ./.yarn/cache
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ jobs:
fetch-depth: 2

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'

- name: Use node_modules cache
uses: actions/cache@v3
uses: actions/cache@v4
id: modules-cache
with:
path: '**/node_modules'
Expand All @@ -70,7 +70,7 @@ jobs:
- name: Deploy portal
if: (github.ref == 'refs/heads/release' ||
github.ref == 'refs/heads/portal')
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.GH_TOKEN }}
publish_dir: ./packages/dnb-design-system-portal/public
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ jobs:
persist-credentials: false

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'

- name: Use node_modules cache
uses: actions/cache@v3
uses: actions/cache@v4
id: modules-cache
with:
path: '**/node_modules'
Expand Down Expand Up @@ -92,12 +92,12 @@ jobs:
fetch-depth: 20 # The "postbuild:ci" method "getCommittedFiles" needs all history

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'

- name: Use node_modules cache
uses: actions/cache@v3
uses: actions/cache@v4
id: modules-cache
with:
path: '**/node_modules'
Expand Down
4 changes: 3 additions & 1 deletion packages/dnb-design-system-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
"prettier:write": "prettier --log-level warn --write '**/*.{md,mdx,js,ts,tsx}'",
"reset": "yarn clean && rm -rf ./node_modules",
"serve": "gatsby serve -p 8000",
"serve:8001": "gatsby serve -p 8001",
"serve:8002": "gatsby serve -p 8002",
"start": "cross-env NODE_OPTIONS=--max-old-space-size=8192 gatsby develop",
"test": "jest",
"test:ci": "jest --ci --passWithNoTests",
"test:e2e:portal": "yarn playwright test",
"test:e2e:portal:ci": "start-server-and-test serve http://localhost:8000 test:e2e:portal",
"test:e2e:portal:ci": "start-server-and-test serve:8002 http://localhost:8002 test:e2e:portal",
"test:e2e:portal:watch": "playwright test --ui",
"test:screenshots": "yarn workspace @dnb/eufemia test:screenshots",
"test:screenshots:ci": "start-server-and-test serve http://localhost:8000 'yarn workspace @dnb/eufemia test:screenshots:ci'",
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-design-system-portal/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig({

use: {
// Base URL to use in actions like `await page.goto('/')`.
baseURL: 'http://localhost:8000',
baseURL: 'http://localhost:8002',

// Name of the browser that runs tests. For example `chromium`, `firefox`, `webkit`.
browserName: 'firefox',
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-eufemia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"test:auto-generated-types": "yarn jest ./postTypeGeneration.test.ts --ci --testPathIgnorePatterns=[]",
"test:ci": "yarn jest --ci",
"test:e2e": "yarn playwright test",
"test:e2e:ci": "start-server-and-test 'yarn workspace dnb-design-system-portal serve' http://localhost:8000 test:e2e",
"test:e2e:ci": "start-server-and-test 'yarn workspace dnb-design-system-portal serve:8001' http://localhost:8001 test:e2e",
"test:e2e:watch": "playwright test --ui",
"test:postbuild": "yarn jest ./postbuild.test.ts --ci --testPathIgnorePatterns=[]",
"test:screenshots": "yarn jest --config=./jest.config.screenshots.js --maxWorkers=1 --detectOpenHandles --testPathPattern ",
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-eufemia/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({

use: {
// Base URL to use in actions like `await page.goto('/')`.
baseURL: 'http://localhost:8000',
baseURL: 'http://localhost:8001',

// Name of the browser that runs tests. For example `chromium`, `firefox`, `webkit`.
browserName: 'firefox',
Expand Down

0 comments on commit 31fa019

Please sign in to comment.