mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-04 09:05:49 -05:00
66 lines
1.3 KiB
YAML
66 lines
1.3 KiB
YAML
name: Node.js CI
|
|
|
|
push:
|
|
branches:
|
|
- master
|
|
- production-**
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [12.x]
|
|
|
|
steps:
|
|
- name: Checkout Source Files
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Lint Source Files
|
|
run: |
|
|
npm ci
|
|
npm run ensure-env --if-present
|
|
npm run lint --if-present
|
|
|
|
build:
|
|
name: Check Builds and Run Integration Tests
|
|
needs: lint
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [12.x]
|
|
|
|
steps:
|
|
- name: Checkout Source Files
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Set Environment variables
|
|
run: cp sample.env .env
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
npm ci
|
|
npm run ensure-env --if-present
|
|
|
|
- name: Build Packages
|
|
run: npm run build --if-present
|
|
|
|
- name: Run Tests
|
|
run: npm test
|