summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-08-01 16:08:41 -0400
committerGitHub <noreply@github.com>2023-08-01 16:08:41 -0400
commit5e89d1a0ab7dd21ccabc91fb3226bab18a2bc18c (patch)
tree4ee9d9401ba3740c35cb5209091c4846ff120ac2 /.github
parent45572e329a395cb20ecb8c2867cc66b7d3a28cfe (diff)
ci: lint on all operating systems (#20012)
Diffstat (limited to '.github')
-rwxr-xr-x.github/workflows/ci.generate.ts22
-rw-r--r--.github/workflows/ci.yml19
2 files changed, 28 insertions, 13 deletions
diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts
index 17e0bae06..148fb1b26 100755
--- a/.github/workflows/ci.generate.ts
+++ b/.github/workflows/ci.generate.ts
@@ -369,6 +369,14 @@ const ci = {
os: Runners.ubuntu,
job: "lint",
profile: "debug",
+ }, {
+ os: Runners.macos,
+ job: "lint",
+ profile: "debug",
+ }, {
+ os: Runners.windows,
+ job: "lint",
+ profile: "debug",
}]),
},
// Always run main branch builds to completion. This allows the cache to
@@ -394,7 +402,7 @@ const ci = {
},
{
...submoduleStep("./tools/node_compat/node"),
- if: "matrix.job == 'lint'",
+ if: "matrix.job == 'lint' && startsWith(matrix.os, 'ubuntu')",
},
{
name: "Create source tarballs (release, linux)",
@@ -488,9 +496,8 @@ const ci = {
"rustc --version",
"cargo --version",
"which dpkg && dpkg -l",
- // Deno is installed when linting.
- 'if [ "${{ matrix.job }}" == "lint" ]',
- "then",
+ // Deno is installed when linting or testing.
+ 'if [[ "${{ matrix.job }}" == "lint" ]] || [[ "${{ matrix.job }}" == "test" ]]; then',
" deno --version",
"fi",
// Node is installed for benchmarks.
@@ -543,13 +550,14 @@ const ci = {
},
{
name: "test_format.js",
- if: "matrix.job == 'lint'",
+ if: "matrix.job == 'lint' && startsWith(matrix.os, 'ubuntu')",
run:
"deno run --unstable --allow-write --allow-read --allow-run ./tools/format.js --check",
},
{
name: "Lint PR title",
- if: "matrix.job == 'lint' && github.event_name == 'pull_request'",
+ if:
+ "matrix.job == 'lint' && github.event_name == 'pull_request' && startsWith(matrix.os, 'ubuntu')",
env: {
PR_TITLE: "${{ github.event.pull_request.title }}",
},
@@ -563,7 +571,7 @@ const ci = {
},
{
name: "node_compat/setup.ts --check",
- if: "matrix.job == 'lint'",
+ if: "matrix.job == 'lint' && startsWith(matrix.os, 'ubuntu')",
run:
"deno run --allow-write --allow-read --allow-run=git ./tools/node_compat/setup.ts --check",
},
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 16b029a85..f777026f8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -95,6 +95,14 @@ jobs:
job: lint
profile: debug
os_display_name: ubuntu-x86_64
+ - os: macos-12
+ job: lint
+ profile: debug
+ os_display_name: macos-x86_64
+ - os: windows-2022
+ job: lint
+ profile: debug
+ os_display_name: windows-x86_64
fail-fast: '${{ github.event_name == ''pull_request'' || (github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')) }}'
env:
CARGO_TERM_COLOR: always
@@ -128,7 +136,7 @@ jobs:
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.wpt)'
- name: Clone submodule ./tools/node_compat/node
run: git submodule update --init --recursive --depth=1 -- ./tools/node_compat/node
- if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'')'
+ if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'' && startsWith(matrix.os, ''ubuntu''))'
- name: 'Create source tarballs (release, linux)'
if: |-
!(github.event_name == 'pull_request' && matrix.skip_pr) && (startsWith(matrix.os, 'ubuntu') &&
@@ -289,8 +297,7 @@ jobs:
rustc --version
cargo --version
which dpkg && dpkg -l
- if [ "${{ matrix.job }}" == "lint" ]
- then
+ if [[ "${{ matrix.job }}" == "lint" ]] || [[ "${{ matrix.job }}" == "test" ]]; then
deno --version
fi
if [ "${{ matrix.job }}" == "bench" ]
@@ -324,10 +331,10 @@ jobs:
with:
cache-path: ./target
- name: test_format.js
- if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'')'
+ if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'' && startsWith(matrix.os, ''ubuntu''))'
run: deno run --unstable --allow-write --allow-read --allow-run ./tools/format.js --check
- name: Lint PR title
- if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'' && github.event_name == ''pull_request'')'
+ if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'' && github.event_name == ''pull_request'' && startsWith(matrix.os, ''ubuntu''))'
env:
PR_TITLE: '${{ github.event.pull_request.title }}'
run: deno run ./tools/verify_pr_title.js "$PR_TITLE"
@@ -335,7 +342,7 @@ jobs:
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'')'
run: deno run --unstable --allow-write --allow-read --allow-run ./tools/lint.js
- name: node_compat/setup.ts --check
- if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'')'
+ if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'' && startsWith(matrix.os, ''ubuntu''))'
run: deno run --allow-write --allow-read --allow-run=git ./tools/node_compat/setup.ts --check
- name: Build debug
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''test'' && matrix.profile == ''debug'')'