Skip to content

Commit

Permalink
Run CI on multiple OS (#3115)
Browse files Browse the repository at this point in the history
`Nx` (used by Lerna) has OS-specific dependencies, and them not being installed on windows breaks the toolchain. These dependencies have been added as optional so that they are in the package-lock, which is consumed by developers building the packages locally.

In order to catch such issues early, the CI now runs on all three major OS instead of just ubuntu. We moved away from running CI on non-ubuntu because of flakyness of the non-ubuntu runners, but in this case we would only be running unit tests, which are less flaky that end-to-end tests. The tests can be prevented from failing the whole workflow on fail in the future if they appear to be still flaky.
  • Loading branch information
NSeydoux authored Sep 18, 2023
1 parent 5818a79 commit 9009b4c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ jobs:
build: true

test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
# We test against different OSes, because the build toolchain has OS-specific dependencies.
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
node-version: ["20.x", "18.x", "16.x"]
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
"typescript": "^5.2.2"
},
"optionalDependencies": {
"fsevents": "^2.3.2"
"fsevents": "^2.3.2",
"@nx/nx-win32-x64-msvc": "^16.8.1"
},
"engines": {
"node": "^16.0.0 || ^18.0.0 || ^20.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/browser/examples/demoClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"clean": "rm -rf ./dist",
"start": "webpack-dev-server --mode development",
"dev": "npm run start",
"build": "ASSET_PATH=\"/demo/\" webpack --mode production",
"build": "webpack --mode production",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/browser/examples/demoClientApp/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module.exports = {
}),
],
output: {
publicPath: process.env.ASSET_PATH || "/",
publicPath: "./demo/",
},
devServer: {
// TODO: PMCB55: make demo's 'prettier' by avoiding 'localhost'...
Expand Down

0 comments on commit 9009b4c

Please sign in to comment.