parent
171b134156
commit
bb16bf0f14
3 changed files with 46 additions and 19 deletions
37
.forgejo/workflows/rust.yml
Normal file
37
.forgejo/workflows/rust.yml
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
name: Rust
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
container: rust:latest
|
||||
|
||||
steps:
|
||||
- uses: forgejo-org/forgejo-actions/setup-node@v1
|
||||
- name: Cache Cargo
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cargo-
|
||||
- name: Install sqlx-cli
|
||||
run: cargo install sqlx-cli --no-default-features --features postgres
|
||||
- name: Prepare
|
||||
run: cargo sqlx prepare --check
|
||||
- name: Build
|
||||
run: cargo build
|
||||
Loading…
Add table
Add a link
Reference in a new issue