-
Notifications
You must be signed in to change notification settings - Fork 61
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
b84e9e0
commit 2f524bc
Showing
1 changed file
with
15 additions
and
20 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: validate | ||
name: ci | ||
on: | ||
push: | ||
branches: ['main'] | ||
|
@@ -9,45 +9,40 @@ jobs: | |
build: | ||
name: 'Build' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [15] | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: 💾 Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
- uses: pnpm/[email protected] | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v1 | ||
version: 7.0.0 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
|
||
- name: 📀 Install dependencies | ||
run: npm install | ||
run: pnpm install | ||
|
||
- name: 🧹 Lint | ||
run: npm run lint | ||
run: pnpm run lint | ||
|
||
- name: 😍 Prettier check | ||
run: npm run check | ||
run: pnpm run check | ||
|
||
- name: 🧪 Test | ||
run: npm run coverage | ||
run: pnpm run coverage | ||
|
||
- name: ⏫ Upload coverage | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 👷♀️ Build | ||
run: npm run build | ||
run: pnpm run build | ||
|
||
- name: ⏫ Upload build artifacts | ||
uses: actions/upload-artifact@v2 | ||
|