Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
qselle committed Dec 1, 2024
1 parent 6266d9d commit ff9bbc6
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
57 changes: 57 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Rust

on:
push:
branches: ["main"]

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test

lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![wakatime](https://wakatime.com/badge/github/qselle/advent-of-code-2024.svg)](https://wakatime.com/badge/github/qselle/advent-of-code-2024)
[![Go](https://github.com/qselle/advent-of-code-2024/actions/workflows/rust.yml/badge.svg)](https://github.com/qselle/advent-of-code-2023/actions/workflows/go.yml) [![wakatime](https://wakatime.com/badge/github/qselle/advent-of-code-2024.svg)](https://wakatime.com/badge/github/qselle/advent-of-code-2024)
# Advent of code 2024 🎄🎅

This time in Rust to learn the language! Using https://github.com/gobanos/cargo-aoc 🦀.
Expand Down

0 comments on commit ff9bbc6

Please sign in to comment.