fix(Anchor:) fixes anchor modifier .dnb-anchor--no-hover #2684
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
name: e2e | |
on: | |
push: | |
branches: | |
- '**' | |
- '!**--skip-ci' | |
- '!**--visual-reports' | |
- '!wip/**' | |
- '!experiments/**' | |
- '!release' | |
- '!portal' | |
- '!beta' | |
- '!alpha' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
GH_EMAIL: ${{ secrets.GH_EMAIL }} | |
GH_NAME: ${{ secrets.GH_NAME }} | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }} | |
FIGMA_ICONS_FILE: ${{ secrets.FIGMA_ICONS_FILE }} | |
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} | |
ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME }} | |
ALGOLIA_SEARCH_KEY: ${{ secrets.ALGOLIA_SEARCH_KEY }} | |
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }} | |
RUN_POST_BUILD: ${{ startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/heads/v') }} | |
jobs: | |
portal-build: | |
name: Run portal build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git checkout | |
if: env.RUN_POST_BUILD == 'false' | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Git checkout (with fetch-depth) | |
if: env.RUN_POST_BUILD == 'true' | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
fetch-depth: 20 # The "postbuild:ci" method "getCommittedFiles" needs all history | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: 'package.json' | |
- name: Use node_modules cache | |
uses: actions/cache@v3 | |
id: modules-cache | |
with: | |
path: '**/node_modules' | |
key: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-modules- | |
- name: Install dependencies | |
if: steps.modules-cache.outputs.cache-hit != 'true' | |
run: yarn install --immutable | |
- name: Prebuild Library | |
if: env.RUN_POST_BUILD == 'true' | |
run: yarn workspace @dnb/eufemia prebuild:ci | |
- name: Postbuild Library | |
if: env.RUN_POST_BUILD == 'true' | |
run: yarn workspace @dnb/eufemia postbuild:ci | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=timestamp::$(date +'%Y-%W')" | |
- name: Use Gatsby cache | |
uses: actions/cache@v3 | |
id: gatsby-cache | |
with: | |
path: | | |
./packages/dnb-design-system-portal/.cache | |
./packages/dnb-design-system-portal/public | |
key: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-gatsby-${{ steps.date.outputs.timestamp }} | |
restore-keys: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-gatsby- | |
- name: Build portal | |
run: yarn workspace dnb-design-system-portal build:visual-test | |
- name: Store portal artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: portal-build-artifact | |
path: ./packages/dnb-design-system-portal/public | |
visual-test: | |
name: Run visual e2e-tests | |
runs-on: macos-latest | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: 'package.json' | |
- name: Use yarn cache | |
uses: actions/cache@v3 | |
id: yarn-cache | |
with: | |
path: ./.yarn/cache | |
key: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-deps-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-deps- | |
- name: Use Playwright cache | |
uses: actions/cache@v3 | |
id: playwright-cache | |
with: | |
path: ~/Library/Caches/ms-playwright | |
key: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-playwright-${{ hashFiles('**/yarn.lock') }} | |
- run: npx playwright-firefox install --with-deps firefox | |
if: steps.playwright-cache.outputs.cache-hit != 'true' | |
- run: npx playwright-firefox install-deps firefox | |
if: steps.playwright-cache.outputs.cache-hit == 'true' | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Wait for build to succeed | |
uses: fountainhead/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
checkName: Run portal build | |
ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
intervalSeconds: 10 | |
timeoutSeconds: 2400 | |
- name: Re-store portal artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: portal-build-artifact | |
path: ./packages/dnb-design-system-portal/public | |
- name: Run visual tests | |
run: yarn workspace dnb-design-system-portal test:screenshots:ci | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: visual-test-artifact | |
path: | | |
./packages/dnb-eufemia/src/**/*.snap-diff.png | |
./packages/dnb-eufemia/jest-visual-diff-report/* | |
- name: Run visual tests info | |
if: failure() | |
run: echo '\n\n👉 Download the diff files as a ZIP file. \nIt is called "visual-test-artifact" and you find it in the test "Summary" under "Artifacts".\n\n\n' | |
- uses: geekyeggo/delete-artifact@v2 | |
with: | |
name: portal-build-artifact | |
- name: Slack | |
uses: 8398a7/action-slack@v3 | |
with: | |
channel: '#eufemia-dev' | |
status: ${{ job.status }} | |
fields: author,ref,workflow,job,took | |
job_name: Run visual e2e-tests | |
github_base_url: https://github.com/ | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | |
if: ${{ always() && !github.event.pull_request.head.repo.fork }} | |
continue-on-error: true | |
portal-test: | |
name: Run portal e2e-tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: 'package.json' | |
- name: Use node_modules cache | |
uses: actions/cache@v3 | |
id: modules-cache | |
with: | |
path: '**/node_modules' | |
key: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-modules- | |
- name: Use Playwright cache | |
uses: actions/cache@v3 | |
id: playwright-binary-cache | |
with: | |
path: ~/.cache/ms-playwright | |
key: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-playwright-binary-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Install Playwright | |
if: steps.playwright-binary-cache.outputs.cache-hit != 'true' | |
run: yarn workspace dnb-design-system-portal playwright install --with-deps firefox | |
- name: Wait for build to succeed | |
uses: fountainhead/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
checkName: Run portal build | |
ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
intervalSeconds: 10 | |
timeoutSeconds: 2400 | |
- name: Re-store portal artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: portal-build-artifact | |
path: ./packages/dnb-design-system-portal/public | |
- name: Run Playwright | |
run: yarn workspace dnb-design-system-portal test:e2e:ci | |
- name: Store Playwright artifacts | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: playwright-develop-artifact | |
path: ./packages/dnb-design-system-portal/test-results | |
- name: Slack | |
uses: 8398a7/action-slack@v3 | |
with: | |
channel: '#eufemia-dev' | |
status: ${{ job.status }} | |
fields: author,ref,workflow,job,took | |
job_name: Run portal e2e-tests | |
github_base_url: https://github.com/ | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | |
if: ${{ always() && !github.event.pull_request.head.repo.fork }} | |
continue-on-error: true |