Skip to content

Commit

Permalink
.github: add cargo fmt, cargo test
Browse files Browse the repository at this point in the history
Run also `cargo fmt` and `cargo test`.
Use actions-rs/cargo Github Actions.
  • Loading branch information
dongsupark committed Oct 23, 2023
1 parent 00e5700 commit 3dfee64
Showing 1 changed file with 29 additions and 14 deletions.
43 changes: 29 additions & 14 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,37 @@
name: Rust
name: Run Rust CI

on:
push:
branches: [ flatcar-master ]
branches:
- flatcar-master
pull_request:
branches: [ flatcar-master ]

env:
CARGO_TERM_COLOR: always
branches:
- flatcar-master

jobs:
build:

build-test:
name: Build and test update-ssh-keys
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- name: Rustfmt Check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all --check
- name: Build update-ssh-keys
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose
- name: Run unit tests of update-ssh-keys
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose

0 comments on commit 3dfee64

Please sign in to comment.