Skip to content

Commit

Permalink
Merge pull request #58 from h4llow3En/feature/ci
Browse files Browse the repository at this point in the history
ci: update
  • Loading branch information
hoodie committed Sep 11, 2024
2 parents 92817e2 + a90eec6 commit 34e172f
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 22 deletions.
39 changes: 17 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
on:
on:
push:
branches:
- main
Expand All @@ -9,35 +9,30 @@ name: Continuous Integration

jobs:
macos:
name: Test and Lint (macos)
name: macos
runs-on: macos-latest
strategy:
matrix:
rust:
- stable
- 1.67.0
- beta
- stable minus 6 releases
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- run: rustup component add clippy
- name: check
uses: actions-rs/cargo@v1
with:
command: check
- name: test
uses: actions-rs/cargo@v1
with:
command: test
args: --no-run
- name: clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
components: clippy, rustfmt

- name: check (default features)
run: cargo check

- name: test (default features)
run: cargo test --no-run

- name: clippy (default features)
run: cargo clippy -- -D warnings

clang-format:
name: test clang-format
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Pull request
# This workflow is triggered on pushes to the repository.
on: [ pull_request ]

jobs:
check:
name: Check Commit Message
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# A PR should not contain too many commits
fetch-depth: 10
- name: Validate commit messages
run: |
git show-ref
curl -sSfL https://github.com/convco/convco/releases/latest/download/convco-ubuntu.zip | zcat > convco
chmod +x convco
./convco check ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
rm convco
18 changes: 18 additions & 0 deletions .github/workflows/semver-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Semver Checks
on:
push:
branches:
- main
pull_request:

jobs:
semver:
name: cargo-semver-checks
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

- name: check semver
uses: obi1kenobi/cargo-semver-checks-action@v2.6

0 comments on commit 34e172f

Please sign in to comment.