-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor to intagrate CI/CD workflow * Add setup composite action and refactor workflow * Refactor workflow to integrate CI/CD and skip Rust setup * Refactor workflow to integrate CI/CD * Fix workflow * Remove unused GITHUB_TOKEN secret from workflow * Add dependency on build job in main workflow * Fix to download archifact before runnning tests * Update Node.js setup action * Remove duplicated pnpm setup action * Create violet-hornets-kick.md * build(deps-dev): bump typedoc-plugin-mdn-links from 3.2.1 to 3.2.4 (#297) * build(deps-dev): bump typedoc-plugin-mdn-links from 3.2.1 to 3.2.4 Bumps [typedoc-plugin-mdn-links](https://github.com/Gerrit0/typedoc-plugin-mdn-links) from 3.2.1 to 3.2.4. - [Changelog](https://github.com/Gerrit0/typedoc-plugin-mdn-links/blob/main/CHANGELOG.md) - [Commits](Gerrit0/typedoc-plugin-mdn-links@v3.2.1...v3.2.4) --- updated-dependencies: - dependency-name: typedoc-plugin-mdn-links dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Create perfect-oranges-hide.md --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yuki Yamazaki <35218186+kamiazya@users.noreply.github.com> * build(deps): bump CodSpeedHQ/action from 2.4.2 to 3.0.0 (#306) Bumps [CodSpeedHQ/action](https://github.com/codspeedhq/action) from 2.4.2 to 3.0.0. - [Release notes](https://github.com/codspeedhq/action/releases) - [Changelog](https://github.com/CodSpeedHQ/action/blob/main/CHANGELOG.md) - [Commits](CodSpeedHQ/action@f11c406...ab07afd) --- updated-dependencies: - dependency-name: CodSpeedHQ/action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
8579cb0
commit 1032118
Showing
8 changed files
with
298 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
web-csv-toolbox: patch | ||
--- | ||
|
||
Refactor CI/CD workflow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Setup Action | ||
description: Composite Setup Action | ||
|
||
inputs: | ||
node-version: | ||
description: Node.js version | ||
required: false | ||
default: '' | ||
skip-rust-setup: | ||
description: Skip Rust setup | ||
required: false | ||
default: 'false' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup pnpm | ||
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | ||
- if: ${{ inputs.node-version == '' }} | ||
name: Setup Node.js | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version-file: ./.node-version | ||
cache: pnpm | ||
- if: ${{ inputs.node-version != '' }} | ||
name: Setup Node.js v${{ inputs.node-version }} | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
cache: pnpm | ||
- name: Install Dependencies | ||
run: pnpm install --frozen-lockfile | ||
shell: bash | ||
- name: Setup C++ | ||
if: ${{ inputs.skip-rust-setup != 'true' }} | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libstdc++-12-dev | ||
shell: bash | ||
- name: Setup Rust | ||
if: ${{ inputs.skip-rust-setup != 'true' }} | ||
uses: moonrepo/setup-rust@d8048d4fdff0633123678b093726e6d7c8ad6de5 # v1.2.0 | ||
with: | ||
targets: wasm32-unknown-unknown | ||
channel: nightly | ||
components: clippy,rustfmt | ||
target-dirs: web-csv-toolbox-wasm/target | ||
- name: Install wasm-pack | ||
if: ${{ inputs.skip-rust-setup != 'true' }} | ||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
name: Dynamic Tests | ||
on: | ||
workflow_call: | ||
secrets: | ||
CODECOV_TOKEN: | ||
required: true | ||
description: The token to upload coverage reports to Codecov | ||
CODSPEED_TOKEN: | ||
required: true | ||
description: The token to upload benchmarks to CodSpeed | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
with: | ||
skip-rust-setup: 'true' | ||
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
- name: Coverage | ||
run: pnpm test:coverage | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
benchmarks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
with: | ||
skip-rust-setup: 'true' | ||
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
- name: Run benchmarks | ||
uses: CodSpeedHQ/action@f11c406b8c87cda176ff341ed4925bc98086f6d1 # v2.4.2 | ||
with: | ||
run: pnpm test:bench | ||
token: ${{ secrets.CODSPEED_TOKEN }} | ||
|
||
test_nodejs: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x, 22.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
- run: pnpm test run | ||
|
||
|
||
test_deno: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
- uses: denoland/setup-deno@041b854f97b325bd60e53e9dc2de9cb9f9ac0cba # v1.1.4 | ||
with: | ||
deno-version: v1.x | ||
- run: | | ||
deno eval ' | ||
import { parse } from "./dist/es/web-csv-toolbox.js"; | ||
const csv = `name,age | ||
Alice,42 | ||
Bob,69`; | ||
for await (const record of parse(csv)) { | ||
console.log(record); | ||
}' | ||
test_linux_browser: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
browsers: | ||
- chrome | ||
- firefox | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
with: | ||
skip-rust-setup: 'true' | ||
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
- run: npm test run -- --browser.name=${{ matrix.browsers }} --browser.headless | ||
|
||
test_macos_browser: | ||
runs-on: macos-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
browsers: | ||
- chrome | ||
# TODO: Consider alternatives to frequent rate limit restrictions. | ||
# - firefox | ||
# NOTE: Headless Safari is currentry not supported | ||
# https://github.com/vitest-dev/vitest/blob/main/packages/browser/src/node/providers/webdriver.ts#L39-L41 | ||
# - safari | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
with: | ||
skip-rust-setup: 'true' | ||
# - if: matrix.browsers == 'safari' | ||
# run: sudo safaridriver --enable | ||
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
- run: pnpm test run -- --browser.name=${{ matrix.browsers }} --browser.headless | ||
|
||
|
||
test_windows_browser: | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
browsers: | ||
- chrome | ||
- firefox | ||
- edge | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
with: | ||
skip-rust-setup: 'true' | ||
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
- run: pnpm test run -- --browser.name=${{ matrix.browsers }} --browser.headless |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Static Tests | ||
|
||
on: | ||
workflow_call: | ||
jobs: | ||
check_format: | ||
name: Check format | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
with: | ||
skip-rust-setup: 'true' | ||
- name: Check | ||
run: pnpm check:format | ||
|
||
check_clippy_and_rustfmt: | ||
name: Check with clippy and rustfmt | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
with: | ||
skip-rust-setup: 'true' | ||
- name: Run Clippy | ||
run: cargo clippy --manifest-path=./web-csv-toolbox-wasm/Cargo.toml --all-targets --all-features | ||
env: | ||
RUSTFLAGS: -D warnings | ||
- name: Run Fmt | ||
run: cargo fmt --manifest-path=./web-csv-toolbox-wasm/Cargo.toml --all -- --check |
Oops, something went wrong.