mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2024-12-14 14:25:38 +00:00
b68d61068a
* Add workflow_call * Add missing import secrest * Run e2e with aqua-playground (#179) * Try to run e2e with aqua-playground * Use workflow_call to run local tests and publish snapshot * Run e2e and tests in parallel * Colors! * Always add comment * Use master branch of aqua-playground * Remove invalid `cache` key * Update .github/workflows/run-tests.yml * Fix branch name in version
88 lines
2.1 KiB
YAML
88 lines
2.1 KiB
YAML
name: Run tests with worflow_call
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
rust-peer-image:
|
|
description: "rust-peer image tag"
|
|
type: string
|
|
default: "fluencelabs/fluence:minimal"
|
|
ref:
|
|
type: string
|
|
default: "master"
|
|
|
|
env:
|
|
RUST_PEER_IMAGE: "${{ inputs.rust-peer-image }}"
|
|
FORCE_COLOR: true
|
|
CI: true
|
|
|
|
jobs:
|
|
fluence-js:
|
|
name: "Run tests"
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version:
|
|
- 16.x
|
|
- 17.x
|
|
|
|
steps:
|
|
- name: Import secrets
|
|
uses: hashicorp/vault-action@v2.4.1
|
|
with:
|
|
url: https://vault.fluence.dev
|
|
path: jwt/github
|
|
role: ci
|
|
method: jwt
|
|
jwtGithubAudience: "https://github.com/fluencelabs"
|
|
jwtTtl: 300
|
|
secrets: |
|
|
kv/docker-registry/basicauth/ci username | DOCKER_USERNAME ;
|
|
kv/docker-registry/basicauth/ci password | DOCKER_PASSWORD
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: docker.fluence.dev
|
|
username: ${{ env.DOCKER_USERNAME }}
|
|
password: ${{ env.DOCKER_PASSWORD }}
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: fluencelabs/fluence-js
|
|
ref: ${{ inputs.ref }}
|
|
|
|
- name: Setup docker-compose
|
|
uses: KengoTODA/actions-setup-docker-compose@v1.0.9
|
|
with:
|
|
version: 'v2.10.0'
|
|
|
|
- name: Pull rust-peer image
|
|
run: docker pull $RUST_PEER_IMAGE
|
|
|
|
- name: Run rust-peer
|
|
uses: isbang/compose-action@v1.1.0
|
|
with:
|
|
compose-file: ".github/e2e/docker-compose.yml"
|
|
down-flags: "--volumes"
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v2.2.2
|
|
with:
|
|
version: 7
|
|
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- run: pnpm i
|
|
- run: pnpm -r build
|
|
- run: pnpm -r test
|