Merge pull request #286 from feketegy/master #77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push] | |
jobs: | |
build: | |
runs-on: [ubuntu-latest] | |
strategy: | |
matrix: | |
# Maintenance versions of node | |
node-version: [12.x, 14.x, 16.x, 17.x] | |
steps: | |
- uses: actions/checkout@v2 | |
# todo - lint commit messages | |
- name: Use node@${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v2 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install dependencies | |
run: yarn | |
- name: Build | |
run: yarn build | |
# todo - make tests | |
# - run: yarn test:unit | |
# - run: yarn test:compatability | |
# todo - deploy in different action? | |
env: | |
CI: true |