Skip to content

Commit

Permalink
Merge pull request #2 from encryptogroup/ci/add-github-ci
Browse files Browse the repository at this point in the history
CI: Add github CI workflow
  • Loading branch information
robinhundt authored Jan 29, 2024
2 parents 44f5993 + 457f1a9 commit dcf6d2a
Show file tree
Hide file tree
Showing 4 changed files with 3,054 additions and 1 deletion.
50 changes: 50 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Pull Request

on:
pull_request:
branches:
- "main"
env:
CARGO_TERM_COLOR: always

jobs:
test:
name: Test
runs-on: "ubuntu-latest"
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install nightly
uses: dtolnay/rust-toolchain@nightly
id: toolchain
with:
components: "clippy, rustfmt"
- name: Override default toolchain
run: rustup override set ${{steps.toolchain.outputs.name}}
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Test
run: cargo test --workspace --verbose --all-features --no-fail-fast
lint:
name: Lint
runs-on: "ubuntu-latest"
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install nightly
uses: dtolnay/rust-toolchain@nightly
id: toolchain
with:
components: "clippy, rustfmt"
- name: Override default toolchain
run: rustup override set ${{steps.toolchain.outputs.name}}
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all --check
- name: Check Clippy
run: cargo +nightly clippy --workspace --all-features --examples --tests -- -D warnings
24 changes: 24 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Push

on: ["push"]

env:
CARGO_TERM_COLOR: always

jobs:
Test:
runs-on: "ubuntu-latest"
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install nightly
uses: dtolnay/rust-toolchain@nightly
id: toolchain
- name: Override default toolchain
run: rustup override set ${{steps.toolchain.outputs.name}}
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Test
run: cargo test --workspace --verbose --all-features --no-fail-fast
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
target
Cargo.lock
*.dot
*.log
cmake-build-*
Expand Down
Loading

0 comments on commit dcf6d2a

Please sign in to comment.