Skip to content

Add CI checks as github actions #19

Add CI checks as github actions

Add CI checks as github actions #19

Workflow file for this run

name: Numtracker CI
on:
push:
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo +nightly fmt -- --check
- name: Clippy
run: |
cargo --version
cargo clippy --version
cargo clippy --all-targets --all-features -- --deny warnings
sqlx_offline:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Check Prepared Queries
run:
- cargo install --locked sqlx-cli

Check failure on line 40 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / Numtracker CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 40, Col: 9): A sequence was not expected
- touch numtracker.db
- cargo sqlx migrate run
- cargo sqlx prepare --check
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Build Everything
run: cargo build --all-targets
- name: Run tests
run: cargo test --all-targets --verbose