Skip to content

Commit

Permalink
cleanup workflow files
Browse files Browse the repository at this point in the history
  • Loading branch information
dmail committed Aug 21, 2024
1 parent 9b5b4c8 commit 6c2dee6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 22 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/ci_eslint_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,24 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
## --- NPM INSTALL START --- ##
# sudo ulimit should prevent npm link failure
- name: set linux fs limits
if: runner.os == 'Linux'
run: |
sudo sysctl fs.inotify.max_user_watches=524288
sudo sysctl -p
sudo sh -c "ulimit -n 65536 && exec su $LOGNAME"
ulimit -n
# sudo ulimit should prevent npm link failure
- name: Install node modules
run: npm install
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1

# Figures out the version of playwright that's installed.
# 1. Because we don't know what version yarn will resolve it to, we have
# to use `yarn why` to get the actually installed version.
# 1. Because we don't know what version npm will resolve it to
# 2. Because we're in a workspace, we need to make sure we get the version
# for the root and not any children, hence the `grep`. If not using
# workspaces, this can be skipped.
# 3. jq comes pre-installed in the Ubuntu runner, so we use that to get
# the correct version string.
# 4. Finally, we use sed to extract just the version number (eg; '1.22.0')
# The result is stored in $PLAYWRIGHT_VERSION
# https://github.com/microsoft/playwright/issues/7249#issuecomment-2299065930
# https://stackoverflow.com/a/33426237/24573072
Expand Down Expand Up @@ -115,17 +111,17 @@ jobs:
- name: Install Playwright's dependencies
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps

- name: Install certificate # needed for @jsenv/service-worker tests
if: runner.os == 'Linux' # https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context
run: npm run https:setup
- name: Fix lightningcss windows
if: runner.os == 'Windows'
run: npm install lightningcss-win32-x64-msvc
## --- NPM INSTALL END --- ##
- name: Run ESLint
env:
NODE_OPTIONS: "--max_old_space_size=4096"
run: npm run eslint
- name: Install certificate # needed for @jsenv/service-worker tests
if: runner.os == 'Linux' # https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context
run: npm run https:setup
- name: Run core tests
run: npm test
env:
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/ci_test_workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
## --- NPM INSTALL START --- ##
# sudo ulimit should prevent npm link failure
- name: set linux fs limits
if: runner.os == 'Linux'
Expand All @@ -57,16 +58,11 @@ jobs:
run: npm install
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1

# Figures out the version of playwright that's installed.
# 1. Because we don't know what version yarn will resolve it to, we have
# to use `yarn why` to get the actually installed version.
# 1. Because we don't know what version npm will resolve it to
# 2. Because we're in a workspace, we need to make sure we get the version
# for the root and not any children, hence the `grep`. If not using
# workspaces, this can be skipped.
# 3. jq comes pre-installed in the Ubuntu runner, so we use that to get
# the correct version string.
# 4. Finally, we use sed to extract just the version number (eg; '1.22.0')
# The result is stored in $PLAYWRIGHT_VERSION
# https://github.com/microsoft/playwright/issues/7249#issuecomment-2299065930
# https://stackoverflow.com/a/33426237/24573072
Expand All @@ -80,7 +76,6 @@ jobs:
- name: Put $HOME in env
if: runner.os == 'windows'
run: echo "HOME=$HOME" | Out-File -FilePath $env:GITHUB_ENV -Append

# Attempt to restore the correct Playwright browser binaries based on the
# currently installed version of Playwright (The browser binary versions
# may change with Playwright versions).
Expand Down Expand Up @@ -114,13 +109,13 @@ jobs:
- name: Install Playwright's dependencies
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps

- name: Install certificate # needed for @jsenv/service-worker tests
if: runner.os == 'Linux' # https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context
run: npm run https:setup
- name: Fix lightningcss windows
if: runner.os == 'Windows'
run: npm install lightningcss-win32-x64-msvc
## --- NPM INSTALL END --- ##
- name: Install certificate # needed for @jsenv/service-worker tests
if: runner.os == 'Linux' # https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context
run: npm run https:setup
- name: Run package tests
run: npm run packages:test
env:
Expand Down

0 comments on commit 6c2dee6

Please sign in to comment.