mirror of
https://github.com/fluencelabs/marine-rs-sdk-test
synced 2025-04-24 23:12:13 +00:00
chore: Add snapshot workflow (#48)
* Add snapshot workflow * Combine snapshot and test workflow * Renaming things * Fixes
This commit is contained in:
parent
461893befd
commit
b66707fdaa
49
.github/workflows/tests.yml
vendored
49
.github/workflows/tests.yml
vendored
@ -10,23 +10,45 @@ on:
|
|||||||
description: "git ref to checkout to"
|
description: "git ref to checkout to"
|
||||||
type: string
|
type: string
|
||||||
default: "master"
|
default: "master"
|
||||||
|
outputs:
|
||||||
env:
|
cargo-version:
|
||||||
RUST_TEST_THREADS: 1
|
description: "Cargo snapshot version"
|
||||||
|
value: ${{ jobs.tests.outputs.version }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
marine-rs-sdk-test:
|
tests:
|
||||||
name: "Run tests"
|
name: "Run tests"
|
||||||
runs-on: builder
|
runs-on: builder
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
version: "${{ steps.snapshot.outputs.version }}"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout to marine-rs-sdk-test
|
- name: Checkout to repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: "fluencelabs/marine-rs-sdk-test"
|
repository: fluencelabs/marine-rs-sdk-test
|
||||||
ref: ${{ inputs.ref }}
|
ref: ${{ inputs.ref }}
|
||||||
|
|
||||||
- name: Setup rust toolchain
|
- name: Import secrets
|
||||||
|
uses: hashicorp/vault-action@v2.4.3
|
||||||
|
with:
|
||||||
|
url: https://vault.fluence.dev
|
||||||
|
path: jwt/github
|
||||||
|
role: ci
|
||||||
|
method: jwt
|
||||||
|
jwtGithubAudience: "https://github.com/fluencelabs"
|
||||||
|
jwtTtl: 300
|
||||||
|
exportToken: false
|
||||||
|
secrets: |
|
||||||
|
kv/cargo-registry/users/ci token | CARGO_REGISTRIES_FLUENCE_TOKEN
|
||||||
|
|
||||||
|
|
||||||
|
- name: Setup Rust toolchain
|
||||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
|
||||||
- name: Set dependencies
|
- name: Set dependencies
|
||||||
@ -35,9 +57,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
dependencies: ${{ inputs.cargo-dependencies }}
|
dependencies: ${{ inputs.cargo-dependencies }}
|
||||||
|
|
||||||
- name: Run cargo build
|
|
||||||
run: cargo build
|
|
||||||
|
|
||||||
- name: Run cargo check
|
- name: Run cargo check
|
||||||
run: cargo check -v --all-features
|
run: cargo check -v --all-features
|
||||||
|
|
||||||
@ -49,3 +68,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Run rustfmt
|
- name: Run rustfmt
|
||||||
uses: actions-rust-lang/rustfmt@v1
|
uses: actions-rust-lang/rustfmt@v1
|
||||||
|
|
||||||
|
- name: Generate snapshot version
|
||||||
|
id: version
|
||||||
|
uses: fluencelabs/github-actions/generate-snapshot-id@main
|
||||||
|
|
||||||
|
- name: Publish crate snapshots
|
||||||
|
id: snapshot
|
||||||
|
uses: fluencelabs/github-actions/cargo-publish-snapshot@main
|
||||||
|
with:
|
||||||
|
id: ${{ steps.version.outputs.id }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user