Skip to content

ci: Parallelize unit tests on the CI (no-changelog) #9

ci: Parallelize unit tests on the CI (no-changelog)

ci: Parallelize unit tests on the CI (no-changelog) #9

Workflow file for this run

name: Test Master
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
with:
ref: ${{ github.sha }}
- uses: ./.github/actions/build-n8n
with:
ref: ${{ github.sha }}
cacheKey: ${{ github.sha }}:build
unit-test:
name: Unit tests
uses: ./.github/workflows/reusable-units-tests.yml
needs: build
strategy:
matrix:
node-version: [18.x, 20.x]
with:
ref: ${{ inputs.branch }}
nodeVersion: ${{ matrix.node-version }}
cacheKey: ${{ github.sha }}:build
collectCoverage: true
lint:
name: Lint changes
uses: ./.github/workflows/reusable-linting.yml
needs: build
with:
ref: ${{ inputs.branch }}
cacheKey: ${{ github.sha }}:build
notify-on-failure:
name: Notify Slack on failure
runs-on: ubuntu-latest
needs: [unit-test, lint]
steps:
- name: Notify Slack on failure
uses: act10ns/slack@v2.0.0
if: failure()
with:
status: ${{ job.status }}
channel: '#alerts-build'
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
message: Master branch (build or test or lint) failed (${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})