Skip to content

Commit

Permalink
Add Github Actions CI (madonoharu#2)
Browse files Browse the repository at this point in the history
Add CI via Github Actions
  • Loading branch information
siefkenj authored Jan 13, 2024
1 parent 3e81856 commit 605aa84
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Build and Test

on:
push:
branches: [main, next]
pull_request:
branches: ["*"]

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v3

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

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

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
test:
name: Test
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v3

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

- name: Add cargo-expand
run: cargo install cargo-expand

- name: Test
uses: actions-rs/cargo@v1
with:
command: test
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v3

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

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

0 comments on commit 605aa84

Please sign in to comment.