Skip to content

verbose testing

verbose testing #5

name: "Test"
on:
pull_request:
branches:
- main
jobs:
run_tests:
name: Verify PR - Tests
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Read .nvmrc
run: echo "##[set-output name=NODE_VERSION;]$(cat package.json | jq .engines.node | sed -e 's/"//g' | sed -e 's/>=//g')"
id: nvm
- name: Save version
run: echo "latest" > version
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "${{ steps.nvm.outputs.NODE_VERSION }}"
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "4.6.2"
- name: Install deps
run: yarn
- name: Prepare
run: yarn nx run-many --target=prepare --parallel --all --verbose
env:
ONEPASSWORD_TOKEN: ${{ secrets.ONEPASSWORD_TOKEN }}
ONEPASSWORD_SERVER_URL: ${{ secrets.ONEPASSWORD_SERVER_URL }}
ONEPASSWORD_VAULT_ID: ${{ secrets.ONEPASSWORD_VAULT_ID }}
- name: Run all unit tests
run: yarn nx run-many --target=test/unit --all --parallel --verbose
build:
name: Verify PR - Buildable
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Read .nvmrc
run: echo "##[set-output name=NODE_VERSION;]$(cat package.json | jq .engines.node | sed -e 's/"//g' | sed -e 's/>=//g')"
id: nvm
- name: Save version
run: echo "latest" > version
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "${{ steps.nvm.outputs.NODE_VERSION }}"
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "4.6.2"
- name: Install deps
run: yarn
- name: Prepare
run: yarn nx run-many --target=prepare --parallel --all
env:
ONEPASSWORD_TOKEN: ${{ secrets.ONEPASSWORD_TOKEN }}
ONEPASSWORD_SERVER_URL: ${{ secrets.ONEPASSWORD_SERVER_URL }}
ONEPASSWORD_VAULT_ID: ${{ secrets.ONEPASSWORD_VAULT_ID }}
- name: Compile affected apps
run: yarn nx affected --target=compile --parallel --base=HEAD~ --head=HEAD --verbose
env:
ONEPASSWORD_TOKEN: ${{ secrets.ONEPASSWORD_TOKEN }}
ONEPASSWORD_SERVER_URL: ${{ secrets.ONEPASSWORD_SERVER_URL }}
ONEPASSWORD_VAULT_ID: ${{ secrets.ONEPASSWORD_VAULT_ID }}
NODE_ENV: production