mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
ci: Add reusable unit test workflow (no-changelog) (#7159)
Github issue / Community forum post (link here to close automatically): --------- Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
committed by
GitHub
parent
a6e027b3ff
commit
c11dfbbe00
35
.github/workflows/ci-pull-requests.yml
vendored
35
.github/workflows/ci-pull-requests.yml
vendored
@@ -34,38 +34,11 @@ jobs:
|
||||
|
||||
unit-test:
|
||||
name: Unit tests
|
||||
runs-on: ubuntu-latest
|
||||
uses: ./.github/workflows/units-tests-reusable.yml
|
||||
needs: install
|
||||
steps:
|
||||
- uses: actions/checkout@v3.5.3
|
||||
with:
|
||||
repository: n8n-io/n8n
|
||||
ref: ${{ inputs.branch }}
|
||||
|
||||
- uses: pnpm/action-setup@v2.4.0
|
||||
|
||||
- name: Use Node.js 18
|
||||
uses: actions/setup-node@v3.7.0
|
||||
with:
|
||||
node-version: 18.x
|
||||
cache: pnpm
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Restore cached build artifacts
|
||||
uses: actions/cache/restore@v3.3.1
|
||||
with:
|
||||
path: ./packages/**/dist
|
||||
key: ${{ github.sha }}-base:18-test-lint
|
||||
|
||||
- name: Test
|
||||
run: pnpm test
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
files: packages/@n8n/client-oauth2/coverage/cobertura-coverage.xml,packages/cli/coverage/cobertura-coverage.xml,packages/core/coverage/cobertura-coverage.xml,packages/design-system/coverage/cobertura-coverage.xml,packages/editor-ui/coverage/cobertura-coverage.xml,packages/nodes-base/coverage/cobertura-coverage.xml,packages/workflow/coverage/cobertura-coverage.xml
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
cacheKey: ${{ github.sha }}-base:18-test-lint
|
||||
|
||||
lint:
|
||||
name: Lint changes
|
||||
|
||||
Reference in New Issue
Block a user