Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v4...v5) --- updated-dependencies: - dependency-name: codecov/codecov-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>
82 lines
2.6 KiB
YAML
82 lines
2.6 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'src/wasm-lib/**.rs'
|
|
- 'src/wasm-lib/**.hbs'
|
|
- 'src/wasm-lib/**.gen'
|
|
- 'src/wasm-lib/**.snap'
|
|
- '**/Cargo.toml'
|
|
- '**/Cargo.lock'
|
|
- '**/rust-toolchain.toml'
|
|
- 'src/wasm-lib/**.kcl'
|
|
- .github/workflows/cargo-test.yml
|
|
|
|
pull_request:
|
|
paths:
|
|
- 'src/wasm-lib/**.rs'
|
|
- 'src/wasm-lib/**.hbs'
|
|
- 'src/wasm-lib/**.gen'
|
|
- 'src/wasm-lib/**.snap'
|
|
- '**/Cargo.toml'
|
|
- '**/Cargo.lock'
|
|
- '**/rust-toolchain.toml'
|
|
- 'src/wasm-lib/**.kcl'
|
|
- .github/workflows/cargo-test.yml
|
|
workflow_dispatch:
|
|
permissions: read-all
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
name: cargo test of wasm-lib
|
|
jobs:
|
|
cargotest:
|
|
name: cargo test
|
|
runs-on: ubuntu-latest-8-cores
|
|
strategy:
|
|
matrix:
|
|
dir: ['src/wasm-lib']
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install latest rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
- name: Install vector
|
|
run: |
|
|
curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev > /tmp/vector.sh
|
|
chmod +x /tmp/vector.sh
|
|
/tmp/vector.sh -y -no-modify-path
|
|
mkdir -p /tmp/vector
|
|
cp .github/workflows/vector.toml /tmp/vector.toml
|
|
sed -i "s#GITHUB_WORKFLOW#${GITHUB_WORKFLOW}#g" /tmp/vector.toml
|
|
sed -i "s#GITHUB_REPOSITORY#${GITHUB_REPOSITORY}#g" /tmp/vector.toml
|
|
sed -i "s#GITHUB_SHA#${GITHUB_SHA}#g" /tmp/vector.toml
|
|
sed -i "s#GITHUB_REF_NAME#${GITHUB_REF_NAME}#g" /tmp/vector.toml
|
|
sed -i "s#GH_ACTIONS_AXIOM_TOKEN#${{secrets.GH_ACTIONS_AXIOM_TOKEN}}#g" /tmp/vector.toml
|
|
cat /tmp/vector.toml
|
|
${HOME}/.vector/bin/vector --config /tmp/vector.toml &
|
|
- uses: taiki-e/install-action@cargo-llvm-cov
|
|
- uses: taiki-e/install-action@nextest
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@v2.6.1
|
|
- name: cargo test
|
|
shell: bash
|
|
run: |-
|
|
cd "${{ matrix.dir }}"
|
|
cargo llvm-cov nextest --workspace --lcov --output-path lcov.info --test-threads=1 --no-fail-fast -P ci 2>&1 | tee /tmp/github-actions.log
|
|
env:
|
|
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
|
RUST_MIN_STACK: 10485760000
|
|
- name: Upload to codecov.io
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
token: ${{secrets.CODECOV_TOKEN}}
|
|
fail_ci_if_error: true
|
|
flags: wasm-lib
|
|
verbose: true
|
|
files: lcov.info
|
|
|