2022-01-13 13:00:31 +00:00
|
|
|
name: CI
|
2023-08-17 09:47:40 +00:00
|
|
|
on: [push, pull_request]
|
2022-06-08 10:36:39 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2022-01-13 13:00:31 +00:00
|
|
|
jobs:
|
2023-08-17 09:47:40 +00:00
|
|
|
lint:
|
|
|
|
name: Lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn && yarn add -D eslint-config-airbnb-base@^15 eslint-plugin-unicorn@^45 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:fomantic/prettier#2.8.3-patched
|
|
|
|
&& 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
|
2022-01-13 13:00:31 +00:00
|
|
|
test:
|
2022-06-08 10:36:39 +00:00
|
|
|
name: Test build process on node ${{ matrix.node-version }}
|
2022-01-13 13:00:31 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
2022-06-08 10:36:39 +00:00
|
|
|
fail-fast: false
|
2022-01-13 13:00:31 +00:00
|
|
|
matrix:
|
2023-08-17 09:47:40 +00:00
|
|
|
node-version: [12, 14, 16, 18, latest]
|
2022-01-13 13:00:31 +00:00
|
|
|
steps:
|
2022-06-08 10:36:39 +00:00
|
|
|
- uses: actions/checkout@v3
|
2023-08-17 09:47:40 +00:00
|
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
2022-06-08 10:36:39 +00:00
|
|
|
uses: actions/setup-node@v3
|
2022-01-13 13:00:31 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: pre-install
|
|
|
|
run: sh ./scripts/preinstall.sh
|
2023-08-17 09:47:40 +00:00
|
|
|
- name: Install dependencies
|
2022-06-08 10:36:39 +00:00
|
|
|
run: yarn
|
2022-01-13 13:00:31 +00:00
|
|
|
- name: pre fomantic install & gulp build
|
2022-06-08 10:36:39 +00:00
|
|
|
run: yarn gulp install
|
2023-08-17 09:47:40 +00:00
|
|
|
codeql:
|
|
|
|
name: CodeQL
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
actions: read
|
|
|
|
contents: read
|
|
|
|
security-events: write
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: github/codeql-action/init@v2
|
|
|
|
with:
|
|
|
|
languages: 'javascript'
|
|
|
|
config-file: ./.github/codeql/codeql-config.yml
|
|
|
|
- name: Autobuild
|
|
|
|
uses: github/codeql-action/autobuild@v2
|
|
|
|
- name: Perform CodeQL Analysis
|
|
|
|
uses: github/codeql-action/analyze@v2
|