feat(lint): lint ts types using CI #2647
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
- name: Install dependencies | |
run: yarn && yarn add -D eslint-config-airbnb-base@^15 eslint-plugin-unicorn@^46 eslint-plugin-jest@^26.9.0 @typescript-eslint/eslint-plugin @typescript-eslint/parser typescript | |
- name: Lint JS and LESS files | |
run: npm run lint | |
- name: Assert LESS files formatting using Prettier | |
run: > | |
yarn add -D github:prettier/prettier#c6e026ea28 | |
&& npx prettier --loglevel warn '!dist' '!test/coverage' '!src/semantic.less' '**/*.{css,less,overrides,variables}' --write | |
&& git restore package.json yarn.lock | |
&& git add . -N && git diff --color --exit-code | |
test: | |
name: Test build process on node ${{ matrix.node-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [12, 14, 16, 18, latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: pre-install | |
run: sh ./scripts/preinstall.sh | |
- name: Install dependencies | |
run: yarn | |
- name: pre fomantic install & gulp build | |
run: yarn gulp install | |
codeql: | |
name: CodeQL | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: github/codeql-action/init@v3 | |
with: | |
languages: 'javascript' | |
config-file: ./.github/codeql/codeql-config.yml | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@v3 | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 |