Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update workflow deps and cancel jobs on PR update #261

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/bench_analyzer.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Parser benchmark, compares main and PR branch with Criterion.
# Comment with text containing `!bench`, a new result will be commented at the bottom of this PR.
# Analyzer benchmark, compares main and PR branch with Criterion.
# Comment with text containing `!bench_analyzer`, a new result will be commented at the bottom of this PR.

name: Analyzer Benchmark

Expand Down Expand Up @@ -29,13 +29,12 @@ jobs:
return response.data.head.sha;

- name: Checkout PR Branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: false
ref: ${{ steps.sha.outputs.result }}

- name: Install toolchain
uses: moonrepo/setup-rust@v0
uses: moonrepo/setup-rust@v1

- name: Install critcmp
run: cargo install critcmp
Expand All @@ -47,7 +46,7 @@ jobs:
run: cargo bench_analyzer --save-baseline pr

- name: Checkout Main Branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
clean: false
ref: main
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/bench_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,12 @@ jobs:
return response.data.head.sha;

- name: Checkout PR Branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: false
ref: ${{ steps.sha.outputs.result }}

- name: Install toolchain
uses: moonrepo/setup-rust@v0
uses: moonrepo/setup-rust@v1

- name: Install hyperfine
run: cargo install hyperfine
Expand All @@ -47,7 +46,7 @@ jobs:
cp target/release/biome benchmark/target/biome_pr

- name: Checkout Main Branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
clean: false
ref: main
Expand All @@ -58,17 +57,17 @@ jobs:
cp target/release/biome benchmark/target/biome_main

- name: Checkout webpack
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: webpack/webpack
path: benchmark/target/webpack
- name: Checkout prettier
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: prettier/prettier
path: benchmark/target/prettier
- name: Checkout eslint
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: eslint/eslint
path: benchmark/target/eslint
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/bench_formatter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Parser benchmark, compares main and PR branch with Criterion.
# Comment with text containing `!bench`, a new result will be commented at the bottom of this PR.
# Formatter benchmark, compares main and PR branch with Criterion.
# Comment with text containing `!bench_formatter`, a new result will be commented at the bottom of this PR.

name: Formatter Benchmark

Expand Down Expand Up @@ -29,13 +29,12 @@ jobs:
return response.data.head.sha;

- name: Checkout PR Branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: false
ref: ${{ steps.sha.outputs.result }}

- name: Install toolchain
uses: moonrepo/setup-rust@v0
uses: moonrepo/setup-rust@v1

- name: Install critcmp
run: cargo install critcmp
Expand All @@ -47,7 +46,7 @@ jobs:
run: cargo bench_formatter --save-baseline pr

- name: Checkout Main Branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
clean: false
ref: main
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/bench_parser.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Parser benchmark, compares main and PR branch with Criterion.
# Comment with text containing `!bench`, a new result will be commented at the bottom of this PR.
# Comment with text containing `!bench_parser`, a new result will be commented at the bottom of this PR.

name: Parser Benchmark

Expand Down Expand Up @@ -28,13 +28,12 @@ jobs:
const response = await github.request(context.payload.issue.pull_request.url);
return response.data.head.sha;
- name: Checkout PR Branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: false
ref: ${{ steps.sha.outputs.result }}

- name: Install toolchain
uses: moonrepo/setup-rust@v0
uses: moonrepo/setup-rust@v1

- name: Install critcmp
run: cargo install critcmp
Expand All @@ -46,7 +45,7 @@ jobs:
run: cargo bench_parser --save-baseline pr

- name: Checkout Main Branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
clean: false
ref: main
Expand Down
38 changes: 15 additions & 23 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@ jobs:
name: Format Rust Files
runs-on: ubuntu-latest
steps:
- name: Checkout PR Branch
uses: actions/checkout@v3
with:
submodules: false
- name: Checkout repository
uses: actions/checkout@v4
- name: Support longpaths
run: git config core.longpaths true
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install toolchain
uses: moonrepo/setup-rust@v0
uses: moonrepo/setup-rust@v1
with:
components: rustfmt
bins: taplo-cli
Expand All @@ -42,9 +40,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install toolchain
uses: moonrepo/setup-rust@v0
uses: moonrepo/setup-rust@v1
with:
components: clippy
- name: Run cargo check
Expand All @@ -56,35 +54,31 @@ jobs:
name: Check Dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout PR Branch
uses: actions/checkout@v3
with:
submodules: false
- name: Checkout repository
uses: actions/checkout@v4
- name: Install toolchain
uses: moonrepo/setup-rust@v0
uses: moonrepo/setup-rust@v1
with:
channel: nightly
- name: Install udeps
run: cargo install cargo-udeps --locked
- name: Run udeps
run: cargo +nightly udeps


test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
- os: ubuntu-latest
- os: macos-latest

name: Test
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install toolchain
uses: moonrepo/setup-rust@v0
uses: moonrepo/setup-rust@v1
with:
bins: cargo-nextest
- name: Run tests on ${{ matrix.os }}
Expand All @@ -95,23 +89,21 @@ jobs:
coverage:
name: Test262 Coverage
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]

steps:
# ref: https://github.com/orgs/community/discussions/26952
- name: Support longpaths
if: matrix.os == 'windows-latest'
run: git config --system core.longpaths true
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install toolchain
uses: moonrepo/setup-rust@v0
uses: moonrepo/setup-rust@v1
- name: Compile
run: cargo build --release --locked -p xtask_coverage
- name: Run Test262 suite
Expand Down
18 changes: 5 additions & 13 deletions .github/workflows/parser_conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,22 @@ jobs:
permissions:
pull-requests: write
name: Parser conformance
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
runs-on: ubuntu-latest

steps:
- name: Checkout PR Branch
uses: actions/checkout@v3
with:
submodules: false
uses: actions/checkout@v4

- name: Support longpaths
run: git config core.longpaths true

- name: Checkout PR Branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install toolchain
uses: moonrepo/setup-rust@v0
uses: moonrepo/setup-rust@v1

- name: Compile
run: cargo build --release --locked -p xtask_coverage
Expand All @@ -53,7 +46,7 @@ jobs:
run: cargo coverage --json > new_results.json

- name: Checkout main Branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
clean: false
ref: main
Expand All @@ -75,7 +68,6 @@ jobs:
cat output >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT


- name: Get the PR number
if: github.event_name == 'pull_request'
id: pr-number
Expand Down
Loading