Skip to content

Commit

Permalink
add in github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
paultag committed Oct 5, 2024
1 parent 2f86c60 commit 6a9bf72
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "cargo" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
reviewers:
- 'paultag'
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
reviewers:
- 'paultag'
- package-ecosystem: "gitsubmodule" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
reviewers:
- 'paultag'
28 changes: 28 additions & 0 deletions .github/workflows/cargo-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on:
push:
branches:
- main
paths:
- "**.rs"
- Cargo.toml
- Cargo.lock
- .github/workflows/cargo-build.yml
pull_request:
paths:
- "**.rs"
- Cargo.toml
- Cargo.lock
- .github/workflows/cargo-build.yml
permissions: read-all
name: cargo build
jobs:
cargobuild:
name: cargo build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Run cargo build
run: |
cargo build --all-features
shell: bash
33 changes: 33 additions & 0 deletions .github/workflows/cargo-clippy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
push:
branches:
- main
paths:
- "**.rs"
- Cargo.toml
- Cargo.lock
- .github/workflows/cargo-clippy.yml
- "rust-toolchain.toml"
- "openapi/*.json"
pull_request:
paths:
- "**.rs"
- Cargo.toml
- Cargo.lock
- .github/workflows/cargo-clippy.yml
- "rust-toolchain.toml"
- "openapi/*.json"
name: cargo clippy
jobs:
cargoclippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy
- name: Run clippy
run: cargo clippy --all-features --tests -- -D warnings
- name: Cargo check --release
run: cargo check --release
35 changes: 35 additions & 0 deletions .github/workflows/cargo-fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
push:
branches:
- main
paths:
- "**.rs"
- "engine"
- "rust-toolchain"
- "rust-toolchain.toml"
- .github/workflows/cargo-fmt.yml
pull_request:
paths:
- "**.rs"
- "rust-toolchain"
- "rust-toolchain.toml"
- .github/workflows/cargo-fmt.yml
- "engine"
permissions:
packages: read
contents: read
name: cargo fmt
jobs:
cargofmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
rustflags: "" # use our .cargo/config.toml
- name: Run cargo fmt
run: |
cargo fmt -- --check
shell: bash
35 changes: 35 additions & 0 deletions .github/workflows/cargo-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
push:
branches:
- main
paths:
- "**.rs"
- Cargo.toml
- Cargo.lock
- .github/workflows/cargo-test.yml
pull_request:
paths:
- "**.rs"
- Cargo.toml
- Cargo.lock
- .github/workflows/cargo-test.yml
workflow_dispatch:
permissions: read-all
name: cargo test
jobs:
cargotest:
name: cargo test
runs-on: ubuntu-latest
strategy:
matrix:
flags: [
"--all-features",
"--no-default-features --features ''"
]
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: cargo test
shell: bash
run: |
cargo test ${{ matrix.flags }}

0 comments on commit 6a9bf72

Please sign in to comment.