condividi-link-fediverso-fi.../.github/workflows/workflow-config.yml

50 lines
1.6 KiB
YAML

name: 'ci/cd'
# This workflow is triggered on pushes to the repository.
on: [push, pull_request]
jobs:
test:
# Job name
name: test
# This job runs on Linux
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- name: Checkout repository
uses: actions/checkout@v2
id: checkout
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node_modules
uses: actions/cache@v2
id: cache
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: |
**/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Installing packages...🏃‍♂️ 🏃‍♂️ 🏃‍♂️
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Running typecheck... 🩺 🔬 🔭
run: npm run code:typecheck
- name: Running eslint... 👀
run: npm run code:lint
- name: Running unit test... 🤞 🚑 💊
run: npm run test:unit -- --runInBand --coverage
- name: Trigger codecov
run: bash <(curl -s https://codecov.io/bash)
- name: Run build Chrome
run: npm run app:chrome
- name: Run build Firefox
run: npm run app:firefox
- name: Run build Edge
run: npm run app:edge