Define dependencies at the workspace level #381
Workflow file for this run
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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow | |
name: Build and test | |
on: | |
push: | |
tags-ignore: [ 'v*.*.*', 'v*.*.*-*' ] | |
branches: ["main"] | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
packages: read | |
jobs: | |
test: | |
name: Test project | |
runs-on: ubuntu-latest | |
env: | |
CARGO_TERM_COLOR: always | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install dev libraries | |
shell: bash | |
run: | | |
sudo apt-get install -y libpq-dev libpq5 libsqlite3-dev libsqlite3-0 | |
- name: Setup Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
rustflags: "" | |
- name: Install cargo-binstall | |
uses: cargo-bins/cargo-binstall@main | |
- name: Install cargo-make | |
shell: bash | |
run: | | |
cargo binstall cargo-make --force | |
- name: Test project | |
shell: bash | |
run: | | |
cargo make test | |
build: | |
name: Build project | |
runs-on: ubuntu-latest | |
needs: | |
test | |
env: | |
CARGO_TERM_COLOR: always | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install dev libraries | |
shell: bash | |
run: | | |
sudo apt-get install -y libpq-dev libpq5 libsqlite3-dev libsqlite3-0 | |
- name: Setup Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
rustflags: "" | |
- name: Install cargo-binstall | |
uses: cargo-bins/cargo-binstall@main | |
- name: Install cargo-make | |
shell: bash | |
run: | | |
cargo binstall cargo-make --force | |
- name: Build project | |
shell: bash | |
run: | | |
cargo make build-fediproto-sync | |