generated from iotaledger/template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
168 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Audit | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "**/Cargo.lock" | ||
- "**/Cargo.toml" | ||
- ".github/workflows/audit.yml" | ||
- ".cargo/audit.toml" | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "**/Cargo.lock" | ||
- "**/Cargo.toml" | ||
- ".github/workflows/audit.yml" | ||
- ".cargo/audit.toml" | ||
|
||
jobs: | ||
audit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/audit-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Build and run tests Ubuntu | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [ opened, synchronize, reopened, ready_for_review ] | ||
branches: | ||
- main | ||
- 'epic/**' | ||
- 'support/**' | ||
paths: | ||
- '.github/workflows/build-and-test.yml' | ||
- '.github/actions/**' | ||
- '**.rs' | ||
- '**.toml' | ||
|
||
env: | ||
RUST_BACKTRACE: full | ||
|
||
jobs: | ||
check-for-run-condition: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
should-run: ${{ !github.event.pull_request || github.event.pull_request.draft == false }} | ||
steps: | ||
- run: | | ||
# this run step does nothing, but is needed to get the job output | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
needs: [ check-for-run-condition ] | ||
if: ${{ needs.check-for-run-condition.outputs.should-run == 'true' }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Rust | ||
uses: './.github/actions/rust/rust-setup' | ||
|
||
- name: Build | ||
run: cargo build --workspace --tests --examples --all-features --release | ||
|
||
- name: Run tests | ||
run: cargo test --workspace --all-features --release | ||
|
||
- name: Run Rust example | ||
run: cargo run --example sd_jwt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Build and run tests Windows | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [ opened, synchronize, reopened, ready_for_review ] | ||
branches: | ||
- main | ||
- 'epic/**' | ||
- 'support/**' | ||
paths: | ||
- '.github/workflows/build-and-test.yml' | ||
- '.github/actions/**' | ||
- '**.rs' | ||
- '**.toml' | ||
|
||
env: | ||
RUST_BACKTRACE: full | ||
|
||
jobs: | ||
check-for-run-condition: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
should-run: ${{ !github.event.pull_request || github.event.pull_request.draft == false }} | ||
steps: | ||
- run: | | ||
# this run step does nothing, but is needed to get the job output | ||
build-and-test: | ||
runs-on: windows-latest | ||
needs: [ check-for-run-condition ] | ||
if: ${{ needs.check-for-run-condition.outputs.should-run == 'true' }} | ||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Rust | ||
uses: './.github/actions/rust/rust-setup' | ||
|
||
- name: Build | ||
run: cargo build --workspace --all-feature --release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Format | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
- 'epic/**' | ||
- 'support/**' | ||
paths: | ||
- '.github/workflows/format.yml' | ||
- '**.rs' | ||
- '**.toml' | ||
- '**.ts' | ||
- '**.js' | ||
- '**.json' | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# we use nightly to get access to advanced format capabilities | ||
- name: Setup Rust | ||
uses: './.github/actions/rust/rust-setup' | ||
with: | ||
toolchain: nightly | ||
|
||
- name: Install cargo-license-template | ||
run: cargo install cargo-license-template | ||
|
||
- name: core fmt check | ||
run: cargo +nightly fmt --all -- --check | ||
|
||
- name: cargo-license-template check | ||
run: cargo +nightly license-template --template .license_template --ignore .license_template_ignore --verbose |