Skip to content

Commit

Permalink
build: add tsc typecheck in CI (#1319)
Browse files Browse the repository at this point in the history
* build: add tsc typecheck in CI
* build: parallelize ci jobs
  • Loading branch information
adamstankiewicz authored Feb 24, 2025
1 parent 56f3a47 commit 77e9f6b
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 21 deletions.
83 changes: 62 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,67 @@ concurrency:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Test
run: npm run test
- name: Upload Coverage
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Check types
run: npm run check-types
- name: Lint
run: npm run lint

extract_translations:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Extract Translations
run: make extract_translations

build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: extract_translations
run: make extract_translations
- name: Test
run: npm run test
- name: Upload Coverage
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
- name: Build
run: npm run build
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"build": "fedx-scripts webpack",
"build:with-theme": "THEME=npm:@edx/brand-edx.org@latest npm run install-theme && npm run build",
"i18n_extract": "fedx-scripts formatjs extract --throws",
"check-types": "tsc --noEmit",
"lint": "fedx-scripts eslint --ext .js --ext .jsx --ext .ts --ext .tsx .",
"lint:fix": "fedx-scripts eslint --fix --ext .js --ext .jsx --ext .ts --ext .tsx .",
"precommit": "npm run lint",
Expand Down

0 comments on commit 77e9f6b

Please sign in to comment.