Fixed workflows #5
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: Build Project | ||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
env: | ||
CARGO_TERM_COLOR: always | ||
runs-on: ubuntu-latest | ||
Check failure on line 12 in .github/workflows/build.yml GitHub Actions / Build ProjectInvalid workflow file
|
||
jobs: | ||
prepare: | ||
name: Prepare | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create environment file | ||
run: cp .env.example .env | ||
- name: Prepare database | ||
run: | | ||
cargo install sqlx-cli | ||
sqlx database create | ||
sqlx migrate run | ||
cargo sqlx prepare | ||
- name: Save prepared database | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: prepared-database | ||
path: migrations | ||
build: | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download prepared database | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: prepared-database | ||
- name: Build | ||
run: cargo build --verbose | ||
- name: Run tests | ||
run: cargo test --verbose |