fluence-js/.github/workflows/run-tests.yml
Anatolios Laskaris 63a3579ee6
chore: Add release-please (#240)
* Add release-please

* Fix

* Fix ci.js

* Rename fluence-js

* Run pnpm i

* Fix

* Update workflows

* Fix
2023-02-15 16:45:04 +02:00

95 lines
2.2 KiB
YAML

name: "ci"
on:
pull_request:
paths-ignore:
- "**.md"
- ".github/**"
- "!.github/workflows/e2e.yml"
- "!.github/workflows/tests.yml"
- "!.github/workflows/snapshot.yml"
push:
branches:
- "master"
paths-ignore:
- "**.md"
- ".github/**"
- "!.github/workflows/e2e.yml"
- "!.github/workflows/tests.yml"
- "!.github/workflows/snapshot.yml"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
env:
RUST_PEER_IMAGE: "fluencelabs/fluence:minimal"
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
- 18.x
steps:
- 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
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
- name: Pull rust-peer image
run: docker pull $RUST_PEER_IMAGE
- name: Run rust-peer
uses: isbang/compose-action@v1.4.1
with:
compose-file: ".github/e2e/docker-compose.yml"
down-flags: "--volumes"
- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
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
- run: pnpm -r build
- run: pnpm -r test