This repository has been archived by the owner on Oct 3, 2024. It is now read-only.
forked from Draggable/formeo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(github-workflows): update build and test workflows for Crosswind
- Loading branch information
1 parent
ff25038
commit b94d1d9
Showing
3 changed files
with
41 additions
and
49 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,23 +1,38 @@ | ||
name: build | ||
name: Build and test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node: [12] | ||
node-version: | ||
- 12.x | ||
- 14.x | ||
- 16.x | ||
- 18.x | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Nodejs ${{ matrix.node }} | ||
uses: actions/setup-node@v1 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Nodejs ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
env: | ||
CI: true | ||
run: npm install | ||
run: npm ci --only=production | ||
|
||
- name: Build | ||
run: npm run build | ||
run: npm run build --if-present | ||
|
||
- name: Test and run coverage | ||
run: npm run test:ci |
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 |
---|---|---|
|
@@ -10,32 +10,28 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [12] | ||
node-version: | ||
- 12.x | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Nodejs ${{ matrix.node }} | ||
uses: actions/setup-node@v1 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Nodejs ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
|
||
- name: Install dependencies | ||
env: | ||
CI: true | ||
run: npm install | ||
run: npm ci --only=production | ||
|
||
- name: Test | ||
run: npm test | ||
run: npm run test:ci | ||
|
||
- name: Build | ||
run: npm run build | ||
- name: Publish | ||
|
||
- name: Publish release to GitHub | ||
if: success() | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npx semantic-release | ||
- name: Build the new version for the demo | ||
if: success() | ||
run: npm run build | ||
- name: Deploy - https://draggable.github.io/formeo/ | ||
if: success() | ||
env: | ||
GH_PAT: ${{ secrets.GH_TOKEN }} | ||
BUILD_DIR: demo/ | ||
uses: maxheld83/[email protected] | ||
run: | | ||
npx -p node@v18-lts -c "npx semantic-release --extends npm" |
This file was deleted.
Oops, something went wrong.