Skip to content

Commit

Permalink
split main workflow in 2
Browse files Browse the repository at this point in the history
  • Loading branch information
dmail committed Aug 13, 2024
1 parent b87dd52 commit 2c6a779
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# - Check linting passes (no eslint error on files)
# - Run tests and ensure none is failing

name: main
name: core

on:
push:
Expand All @@ -18,13 +18,15 @@ on:
- "**/README.md"
- "**/md/**"
- "**/docs/**"
- "**/packages/independent/workflow/**"
pull_request:
branches:
- "**"
paths-ignore:
- "**/README.md"
- "**/md/**"
- "**/docs/**"
- "**/packages/independent/workflow/**"

jobs:
test:
Expand Down Expand Up @@ -61,23 +63,7 @@ jobs:
run: npm install lightningcss-win32-x64-msvc
- name: Run ESLint
run: npm run eslint
- name: Run packages tests
# env:
# NODE_V8_COVERAGE: .coverage/packages
run: npm run workspace:test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run core tests
run: npm test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Run core tests
# env:
# NODE_V8_COVERAGE: .coverage/core
# run: npm run test -- --coverage
# - name: Upload coverage
# uses: codecov/codecov-action@v2
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# files: ./.coverage/coverage.json,./packages/integrity/.coverage/coverage.json,./packages/utils/.coverage/coverage.json
# verbose: true
65 changes: 65 additions & 0 deletions .github/workflows/ci_test_workspace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This file configure a GitHub workflow responsible to perform
# various checks related to the codebase.
#
# For that reason it's runned on every pull request and push to main.
#
# It does the following:
# - Check linting passes (no eslint error on files)
# - Run tests and ensure none is failing

name: core

on:
push:
branches:
- main
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#patterns-to-match-file-paths
paths-ignore:
- "**/README.md"
- "**/md/**"
- "**/docs/**"
pull_request:
branches:
- "**"
paths-ignore:
- "**/README.md"
- "**/md/**"
- "**/docs/**"

jobs:
test:
strategy:
matrix:
os: [ubuntu-20.04, macos-12, windows-2022] # https://github.com/actions/runner-images
node: [22.3.0]
runs-on: ${{ matrix.os }}
name: test on ${{ matrix.os }} and node ${{ matrix.node }}
env:
CI: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- 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
- name: Install playwright
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: node ./scripts/test/certificate_install.mjs
- name: Fix lightningcss windows
if: runner.os == 'Windows'
run: npm install lightningcss-win32-x64-msvc
- name: Run workspace tests
run: npm run workspace:test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 2c6a779

Please sign in to comment.