Skip to content

Merge pull request #2 from jonhleno/main #13

Merge pull request #2 from jonhleno/main

Merge pull request #2 from jonhleno/main #13

Workflow file for this run

name: Unit tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
python-version: [3.9]
env:
NAMESPACE: '@plonegovbr'
GIT_NAME: volto-vlibras
GIT_USER: 'plonegovbr'
GIT_BRANCH: ${GITHUB_REF##*/}
steps:
- name: Main checkout
uses: actions/checkout@v2
# node setup
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
# node cache
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
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-
# node install
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Install yo and @plone/generator-volto
run: npm i -g yo @plone/generator-volto
- name: Setup addon testing environment
run: npx -p @plone/scripts addon clone https://github.com/${{env.GIT_USER}}/${{env.GIT_NAME}}.git --branch ${{env.GIT_BRANCH}}
# Unit tests
- name: Unit tests
run: cd addon-testing-project && yarn && CI=true yarn test