Skip to content

feat(release): adding automation to publish on SAR on new GH releases #19

feat(release): adding automation to publish on SAR on new GH releases

feat(release): adding automation to publish on SAR on new GH releases #19

Workflow file for this run

name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy, rustfmt
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-rust-test-${{ hashFiles('**/Cargo.lock') }}
- name: Run cargo fmt
run: cargo fmt -- --check
- name: Run clippy
run: cargo clippy -- -D warnings
- name: Run cargo check
run: cargo check --all-features --locked --release
- name: Run cargo build
run: cargo build --locked --release
- name: Generate code coverage
run: cargo llvm-cov --all-features --lcov --output-path lcov.info
- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: true
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Install zig
uses: goto-bus-stop/setup-zig@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
target
key: ${{ runner.os }}-rust-build-${{ hashFiles('**/Cargo.lock') }}
- name: Install cargo lambda
run: |
if [ ! -f ~/.cargo/bin/cargo-lambda ]
then
cargo install --locked cargo-lambda
else
echo "Cargo Lambda already installed"
fi
- name: Run cargo lambda build
run: cargo lambda build --locked --release