Skip to content

chore: update actions to latest versions #202

chore: update actions to latest versions

chore: update actions to latest versions #202

Workflow file for this run

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