Skip to content

Add release and test github workflows #42

Add release and test github workflows

Add release and test github workflows #42

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: write
jobs:
setup-environment:
name: Set env vars
runs-on: ubuntu-latest
outputs:
cargo_cache_key: ${{ steps.cargo_cache_key.outputs.value }}
steps:
- name: Set cargo cache key
id: cargo_cache_key
run: |
CARGO_CACHE_KEY="${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/rust-toolchain') }}"
echo "the key is $CARGO_CACHE_KEY"
echo "value=$CARGO_CACHE_KEY" >> $GITHUB_ENV
echo "::set-output name=value::$CARGO_CACHE_KEY"
lint:
needs: setup-environment
uses: ./.github/workflows/lint.yml
with:
cache-key: ${{ needs.setup-environment.outputs.cargo_cache_key }}
# test:
# name: Test
# needs: setup-environment
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions-rust-lang/setup-rust-toolchain@v1
# - name: Cargo test
# run: cargo test --release --workspace --all-targets --all-features
# check-msrv:
# uses: ./.github/workflows/msrv.yml