Skip to content

Refactor, inner infrastructure updates #44

Refactor, inner infrastructure updates

Refactor, inner infrastructure updates #44

Workflow file for this run

name: Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
eslint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18.x, 20.x ]
steps:
- name: Using branch ${{ github.ref }} for repository ${{ github.repository }}.
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: .yarn
key: ${{ runner.OS }}-node-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-node-${{ matrix.node-version }}-yarn-
- name: Install dependencies
run: |
yarn install
- name: Run lint
run: |
yarn lint
tests:
needs: eslint
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Using branch ${{ github.ref }} for repository ${{ github.repository }}.
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: .yarn
key: ${{ runner.OS }}-node-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-node-${{ matrix.node-version }}-yarn-
- name: Install dependencies
run: |
yarn install
- name: Run tests
run: |
yarn test:coverage
- name: Upload coverage to GitHub Artifacts
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.node-version }}
path: coverage/
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info