mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-13 13:00:15 -04:00
chore: add knip to ci (#48149)
* chore: add knip to ci
* DEBUG: checking things fail
* refactor: split into separate workflow
* fix: restrict to node 16
Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
* feat: run on schedule only
* Revert "DEBUG: checking things fail"
This reverts commit b8b4fe1bb2.
* chore: rename file & name
Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
Co-authored-by: Mrugesh Mohapatra <hi@mrugesh.dev>
This commit is contained in:
committed by
GitHub
parent
b05c99d720
commit
6f5b372f75
41
.github/workflows/node.js-find-unused.yml
vendored
Normal file
41
.github/workflows/node.js-find-unused.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: CI - Unused Exports, Types and Files
|
||||
env:
|
||||
NODE_OPTIONS: '--max_old_space_size=6144'
|
||||
on:
|
||||
schedule:
|
||||
# runs every monday at 08:45 UTC
|
||||
- cron: '45 8 * * 1'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Find Unused
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
|
||||
steps:
|
||||
- name: Checkout Source Files
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
|
||||
- name: Set Environment variables
|
||||
run: |
|
||||
cp sample.env .env
|
||||
cat .env
|
||||
|
||||
- name: Run Checks
|
||||
run: |
|
||||
echo npm version $(npm -v)
|
||||
npm ci
|
||||
npm run knip
|
||||
Reference in New Issue
Block a user