Skip to content

Revive stac-react - v.1.0.0 #52

Revive stac-react - v.1.0.0

Revive stac-react - v.1.0.0 #52

Workflow file for this run

name: Checks
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
prep:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.8.0
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2
- name: Read .nvmrc
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Use Node.js ${{ env.NVMRC }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NVMRC }}
- name: Cache node_modules
uses: actions/cache@v2
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
- name: Install
run: yarn install
lint:
needs: prep
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Read .nvmrc
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Use Node.js ${{ env.NVMRC }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NVMRC }}
- name: Cache node_modules
uses: actions/cache@v2
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
- name: Install
run: yarn install
- name: Lint
run: yarn lint
test:
needs: prep
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Read .nvmrc
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Use Node.js ${{ env.NVMRC }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NVMRC }}
- name: Cache node_modules
uses: actions/cache@v2
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
- name: Install
run: yarn install
- name: Test
run: yarn test
build:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Read .nvmrc
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Use Node.js ${{ env.NVMRC }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NVMRC }}
- name: Cache node_modules
uses: actions/cache@v2
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
- name: Install
run: yarn install
- name: Test
run: yarn build