This repository has been archived on 2022-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
hydrogen-web/.github/workflows/codechecks.js.yml

48 lines
1.4 KiB
YAML
Raw Normal View History

2021-05-20 15:00:42 +05:30
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
2021-05-20 19:15:18 +05:30
# yarn cache setup from https://www.karltarvas.com/2020/12/09/github-actions-cache-yarn-install.html
2021-05-20 15:00:42 +05:30
name: Code checks
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
2021-05-20 19:04:06 +05:30
- name: Checkout source
2021-05-20 15:00:42 +05:30
uses: actions/checkout@v2
- name: Install tools
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
2021-05-20 19:10:53 +05:30
# See: https://github.com/actions/cache/blob/main/examples.md#node---yarn
2021-05-20 19:04:06 +05:30
- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Use Yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --prefer-offline --frozen-lockfile
2021-05-20 15:00:42 +05:30
- name: Unit tests
2021-05-20 19:04:06 +05:30
run: yarn test
2021-05-20 15:00:42 +05:30
- name: Lint
2021-08-18 21:16:37 +05:30
run: yarn run lint-ci
- name: Typescript
run: yarn run tsc