mirror of
https://github.com/fluencelabs/marine-rs-sdk-test
synced 2024-12-04 15:20:18 +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"
|
||||
type: string
|
||||
default: "master"
|
||||
|
||||
env:
|
||||
RUST_TEST_THREADS: 1
|
||||
outputs:
|
||||
cargo-version:
|
||||
description: "Cargo snapshot version"
|
||||
value: ${{ jobs.tests.outputs.version }}
|
||||
|
||||
jobs:
|
||||
marine-rs-sdk-test:
|
||||
tests:
|
||||
name: "Run tests"
|
||||
runs-on: builder
|
||||
|
||||
outputs:
|
||||
version: "${{ steps.snapshot.outputs.version }}"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: Checkout to marine-rs-sdk-test
|
||||
- name: Checkout to repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: "fluencelabs/marine-rs-sdk-test"
|
||||
repository: fluencelabs/marine-rs-sdk-test
|
||||
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
|
||||
|
||||
- name: Set dependencies
|
||||
@ -35,9 +57,6 @@ jobs:
|
||||
with:
|
||||
dependencies: ${{ inputs.cargo-dependencies }}
|
||||
|
||||
- name: Run cargo build
|
||||
run: cargo build
|
||||
|
||||
- name: Run cargo check
|
||||
run: cargo check -v --all-features
|
||||
|
||||
@ -49,3 +68,13 @@ jobs:
|
||||
|
||||
- name: Run rustfmt
|
||||
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…
Reference in New Issue
Block a user