Skip to content

chore: test workflow with cache #13

chore: test workflow with cache

chore: test workflow with cache #13

Workflow file for this run

name: Code Quality
on: push
env:
CARGO_TERM_COLOR: always
stage: prod
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-index-
- name: Install Rust toolchain and components
run: |
rustup update --no-self-update stable
rustup component add --toolchain stable rustfmt clippy
rustup default stable
- name: Create .env file
run: |
echo "SERVER_SSL_CA=${{ secrets.SERVER_SSL_CA }}" >> .env
echo "SERVER_SSL_CERT=${{ secrets.SERVER_SSL_CERT }}" >> .env
echo "SERVER_SSL_KEY=${{ secrets.SERVER_SSL_KEY }}" >> .env
- name: Build and Test
run: |
cargo build --verbose
cargo test --verbose
cargo clippy -- -D warnings
cargo fmt -- --check