name: Rust on: push: branches: - master env: CARGO_TERM_COLOR: always SQLX_VERSION: 0.7.1 SQLX_FEATURES: "rustls,postgres" jobs: test: name: Test runs-on: ubuntu-latest services: postgres: image: postgres:15 ports: - 5432:5432 steps: - uses: actions/checkout@v4 - run: rustup toolchain install stable --profile minimal - uses: Swatinem/rust-cache@v2 with: cache-on-failure: "" - name: Migrate database run: | sudo apt-get install libpq-dev -y cargo install sqlx-cli --no-default-features --features postgres ./scripts/init_db.sh - name: Run tests run: cargo test