chore: update actions to latest versions #202
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 and test | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
id: cache | |
with: | |
path: node_modules | |
key: node-modules-${{ hashFiles('yarn.lock') }} | |
- name: Instal dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- name: Cache node modules @ example | |
uses: actions/cache@v4 | |
id: cache-example | |
with: | |
path: ./example/node_modules | |
key: node-modules-example--${{ hashFiles('example/yarn.lock') }} | |
- name: Instal dependencies @ example | |
if: steps.cache-example.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile --cwd ./example | |
- name: Cache node modules @ website | |
uses: actions/cache@v4 | |
id: cache-website | |
with: | |
path: ./website/node_modules | |
key: node-modules-website-${{ hashFiles('website/yarn.lock') }} | |
- name: Instal dependencies @ website | |
if: steps.cache-website.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile --cwd ./website | |
test: | |
needs: build | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
id: cache | |
with: | |
path: node_modules | |
key: node-modules-${{ hashFiles('yarn.lock') }} | |
- name: Instal dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- name: Cache node modules @ website | |
uses: actions/cache@v4 | |
id: cache-website | |
with: | |
path: ./website/node_modules | |
key: node-modules-website-${{ hashFiles('website/yarn.lock') }} | |
- name: Instal dependencies @ website | |
if: steps.cache-website.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile --cwd ./website | |
- name: Cache node modules @ example | |
uses: actions/cache@v4 | |
id: cache-example | |
with: | |
path: ./example/node_modules | |
key: node-modules-example--${{ hashFiles('example/yarn.lock') }} | |
- name: Instal dependencies @ example | |
if: steps.cache-example.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile --cwd ./example | |
- name: Run tests | |
run: | | |
yarn run lint | |
yarn run flow |