vega-frontend-monorepo/.github/workflows/test.yml
Bartłomiej Głownia 17f93c2b7e
chore: add build-spec targets and execute on affected apps and libs on CI (#1745)
* chore: add build-spec targets and execute on affected apps and libs on CI

* chore: fix market-depth and react-helpers specs typings

* chore: fix ui-toolkit specs typings

* chore: fix trades specs typings

* chore: fix orders specs typings

* chore: fix deposits specs typings

* chore: fix deal-ticket specs typings

* feat: fix tsc on specs check

* feat: fix tsc on specs check

* feat: fix tsc on specs check

* feat: fix tsc on specs check

* feat: fix tsc on specs check - fix token app

* feat: fix tsc on specs check - fix positions lib

* feat: fix tsc on specs check - fix environment lib

* chore: fix failling build-spec in positions lib

Co-authored-by: maciek <maciek@vegaprotocol.io>
2022-10-25 09:41:16 +02:00

47 lines
1.2 KiB
YAML

name: Unit tests & build
on:
push:
branches:
- develop
- main
pull_request:
jobs:
pr:
name: Test and lint - PR
runs-on: ubuntu-latest
permissions:
contents: 'read'
actions: 'read'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2
with:
main-branch-name: ${{ github.base_ref }}
- name: Use Node.js 16
id: Node
uses: actions/setup-node@v3
with:
node-version: 16.14.0
- name: Restore node_modules from cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: node_modules-${{ hashFiles('**/yarn.lock') }}
- name: Install root dependencies
run: yarn install --frozen-lockfile
- name: Check formatting
run: yarn nx format:check
- name: Lint affected
run: yarn nx affected:lint --max-warnings=0
- name: Test affected
run: yarn nx affected:test
- name: Build affected
run: yarn nx affected:build
- name: Build affected spec
run: yarn nx affected --target=build-spec