Skip to content

Fixed workflows

Fixed workflows #8

Workflow file for this run

name: Build Project
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
prepare:
runs-on: ubuntu-latest
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: |
target
.env
.sqlx
build:
name: Build
runs-on: ubuntu-latest
needs: prepare
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