fix: flush or fail always (don't hang) #1524
Workflow file for this run
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: nodejs | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
# Add to every job | |
# - uses: actions/cache@v1 | |
# id: nodejs-cache | |
# name: Cache node modules | |
# with: | |
# path: node_modules | |
# key: ${{ matrix.os }}-nodejs-${{ matrix.node }}-${{ hashFiles('yarn.lock') }} | |
# restore-keys: | | |
# ${{ matrix.os }}-nodejs-${{ matrix.node }}- | |
# ${{ matrix.os }}-nodejs- | |
# ${{ matrix.os }}- | |
jobs: | |
lint: | |
if: "!contains(toJson(github.event.commits), '[skip ci]')" | |
env: | |
CI: true | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [20.x] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
if: steps.nodejs-cache.outputs.cache-hit != 'true' | |
- uses: actions/cache@v1 | |
id: nodejs-cache | |
name: Cache node modules | |
with: | |
path: node_modules | |
key: ${{ matrix.os }}-nodejs-${{ matrix.node }}-${{ hashFiles('yarn.lock') }} | |
restore-keys: | | |
${{ matrix.os }}-nodejs-${{ matrix.node }}- | |
${{ matrix.os }}-nodejs- | |
${{ matrix.os }}- | |
- name: Installing dependencies | |
if: steps.nodejs-cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile --check-files | |
- name: Linting & Format codebase with ESLint and Prettier | |
run: yarn lint && yarn fmt | |
test: | |
if: "!contains(toJson(github.event.commits), '[skip ci]')" | |
env: | |
CI: true | |
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
node: [18.x, 20.x] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
if: steps.nodejs-cache.outputs.cache-hit != 'true' | |
- uses: actions/cache@v1 | |
id: nodejs-cache | |
name: Cache node modules | |
with: | |
path: node_modules | |
key: ${{ matrix.os }}-nodejs-${{ matrix.node }}-${{ hashFiles('yarn.lock') }} | |
restore-keys: | | |
${{ matrix.os }}-nodejs-${{ matrix.node }}- | |
${{ matrix.os }}-nodejs- | |
${{ matrix.os }}- | |
- name: Installing dependencies | |
if: steps.nodejs-cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile --check-files | |
- name: Testing | |
run: yarn test:ci | |
- name: Sending test coverage to CodeCov | |
if: matrix.os == 'ubuntu-latest' && matrix.node == '20.x' | |
run: echo ${{ matrix.node }} && bash <(curl -s https://codecov.io/bash) |