-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb5192e
commit 5339b7b
Showing
1 changed file
with
78 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
cache: 'npm' | ||
- name: Get npm cache directory | ||
id: npm-cache-dir | ||
shell: bash | ||
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} | ||
- uses: actions/cache@v4 | ||
id: npm-cache | ||
with: | ||
path: | | ||
${{ steps.npm-cache-dir.outputs.dir }} | ||
**/node_modules | ||
.eslintcache | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: ${{ runner.os }}-node- | ||
- name: Install modules | ||
run: npm install --no-audit --no-fund | ||
- name: Build | ||
run: npm run build | ||
- name: Demo build | ||
run: npm run demo:build | ||
|
||
code_quality: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
cache: 'npm' | ||
- name: Get npm cache directory | ||
id: npm-cache-dir | ||
shell: bash | ||
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} | ||
- uses: actions/cache@v4 | ||
id: npm-cache | ||
with: | ||
path: | | ||
${{ steps.npm-cache-dir.outputs.dir }} | ||
**/node_modules | ||
.eslintcache | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: ${{ runner.os }}-node- | ||
- name: Install modules | ||
run: npm install --no-audit --no-fund | ||
- name: Run code quality tests | ||
run: npm run lint | ||
|
||
export_size: | ||
runs-on: macos-latest | ||
if: github.event_name == 'pull_request' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: '0' | ||
- uses: titouanmathis/export-size-action@main | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
build_script: npm run build-for-export-size | ||
paths: dist | ||
bundler: esbuild | ||
node-version: '18' |