name: Run tests with worflow_call on: workflow_call: inputs: rust-peer-image: description: "rust-peer image tag" type: string default: "fluencelabs/fluence:minimal" avm-version: description: "@fluencelabs/avm version" type: string 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 - 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 ${{ matrix.node-version }} with self-hosted registry uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} registry-url: "https://npm.fluence.dev" cache: "pnpm" - run: pnpm i - name: Set avm version from branch if: inputs.avm-version != '' working-directory: packages/fluence-js run: pnpm add --save @fluencelabs/avm@${{ inputs.avm-version }} - run: pnpm -r build - run: pnpm -r test