Skip to content

Commit

Permalink
Chore: Adding GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
joshleaves committed Feb 25, 2024
1 parent a81bf65 commit 5d3611c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Rust build and test
on:
push:
branches: [ "master" ]

env:
CARGO_TERM_COLOR: always
CLICOLOR_FORCE: 1

jobs:
build:
name: Build, test, and check project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build
- name: Check syntax
run: cargo fmt -- --check
- name: Run tests
run: cargo test
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Of note:
## [2015.5.3]
### Added
- Using [cargo-mutants](https://github.com/sourcefrog/cargo-mutants) to check untested code.
- Adding a GitHub action.

### Changed
- All `.solve` methods return a `None` and only `main()` will be returning errors.

Expand Down
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[[bin]]
name = "advent-rs"
path = "src/main.rs"

[lib]
name = "advent_rs"
path = "src/lib.rs"
doctest = false

[profile.dev]
Expand Down

0 comments on commit 5d3611c

Please sign in to comment.