organize workflow (#601) #6
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: Rust CI | |
on: [push, pull_request] | |
# Make sure CI fails on all warnings, including Clippy lints | |
env: | |
RUSTFLAGS: "-Dwarnings" | |
jobs: | |
editor-server-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: cd editor-server && cp .env.development .env | |
- name: Start database | |
run: docker compose -f dev.docker-compose.yml up -d | |
- name: Migrate database | |
run: cd editor-server && cargo prisma migrate dev --skip-generate --name init | |
- name: build test and clippy check | |
run: cargo clippy --manifest-path ./editor-server/Cargo.toml | |
- name: fmt check | |
run: cargo fmt --manifest-path ./editor-server/Cargo.toml | |
file-server-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: build test and clippy check | |
run: cargo clippy --manifest-path ./file-server/Cargo.toml | |
- name: fmt check | |
run: cargo fmt --manifest-path ./file-server/Cargo.toml |