Feat: docker image cache #463
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
name: CI | ||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
workflow_dispatch: | ||
env: | ||
DATABASE_URL: postgres://backend:password@localhost:5432/hack4krak | ||
CARGO_TERM_COLOR: always | ||
# Make sure CI fails on all warnings, including Clippy lints | ||
RUSTFLAGS: "-Dwarnings" | ||
jobs: | ||
frontend: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9.15.4 | ||
run_install: false | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
cache: 'pnpm' | ||
- name: 'Install dependencies' | ||
run: | | ||
pnpm install | ||
- name: "Run tests" | ||
run: pnpm frontend:test | ||
- name: "Run lint" | ||
run: pnpm frontend:lint | ||
backend: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Cache Docker images. | ||
uses: ScribeMD/[email protected] | ||
with: | ||
key: docker-${{ runner.os }}-${{ hashFiles(paths) }} | ||
Check failure on line 49 in .github/workflows/ci.yaml GitHub Actions / CIInvalid workflow file
|
||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
components: rustfmt, clippy | ||
- name: Install dependencies | ||
run: | | ||
cd backend/ | ||
cargo build | ||
cd .. | ||
- name: "Run tests" | ||
run: | | ||
cd backend/ | ||
cargo test | ||
cd .. | ||
- name: "Run lint" | ||
run: | | ||
cd backend/ | ||
cargo fmt && cargo clippy | ||
cd .. |