Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Numtracker CI
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of scope but can we decide if this project is called "numtracker" or "data endpoint lookup" and sort out all the references in this repo. Not opinionated on the verdict.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think either name really says what it does and numtracker was shorter. Agree there should probably only be one name though.


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
# Use nightly for formatting to enable unstable formatting styles
# * group imports
# * import_granularity
run: cargo +nightly fmt -- --check
- name: Clippy
run: |
cargo --version
cargo clippy --version
cargo clippy --all-targets --all-features -- --deny warnings

sqlx_offline:
name: Check prepared offline query data
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Install sqlx CLI
run: cargo install [email protected]
- name: Check Prepared Queries
run: |
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