-
-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build checks and improve existing CI/CD checks
Run quality checks for every possible OS because behavior of linting rules may change per OS (e.g. `linebreak-style` ESLint assertment varies by Unix-like vs Windows). Add a new check to ensure project can be built: 1. As both web and desktop applications. Different jobs are used due to nonidentical environment/mode support. Reference: nklayman/vue-cli-plugin-electron-builder#1627. 2. Targeting all possible modes. The modes are configured using `--mode` but electron CLI checks `NODE_ENV` so it's set as well. Reference: nklayman/vue-cli-plugin-electron-builder#1626. 3. On and for different operating systems. Fix typo "Run units" instead of "Run unit tests". Link to specific GitHub actions page for workflow runs. Update documentation to match new structure, and change nontransparent icons from the diagram and consistently use imperative for actions. Rename `release-site` , `release-git`, `release-desktop` to `site-release` , `git-release` and `desktop-release` to not be Yoda.
- Loading branch information
1 parent
61b475f
commit 17298f0
Showing
9 changed files
with
84 additions
and
18 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,59 @@ | ||
name: build-checks | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build-web: | ||
strategy: | ||
matrix: | ||
os: [ macos, ubuntu, windows ] | ||
mode: [ development, test, production ] | ||
fail-fast: false # Allows to see results from other combinations | ||
runs-on: ${{ matrix.os }}-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 15.x | ||
- | ||
name: Install dependencies | ||
run: npm ci | ||
- | ||
name: Build | ||
run: npm run build -- --mode ${{ matrix.mode }} | ||
|
||
# A new job is used due to environments/modes different from Vue CLI, https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/1626 | ||
build-desktop: | ||
strategy: | ||
matrix: | ||
os: [ macos, ubuntu, windows ] | ||
mode: [ development, production ] # "test" is not supported https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/1627 | ||
fail-fast: false # Allows to see results from other combinations | ||
runs-on: ${{ matrix.os }}-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 15.x | ||
- | ||
name: Install dependencies | ||
run: npm ci | ||
- | ||
name: Install cross-env | ||
# Used to set NODE_ENV due to https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/1626 | ||
run: npm install --global cross-env | ||
- | ||
name: Build | ||
run: |- | ||
cross-env-shell NODE_ENV=${{ matrix.mode }} | ||
npm run electron:build -- --publish never --mode ${{ matrix.mode }} |
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
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: desktop-release | ||
name: release-desktop | ||
|
||
on: | ||
release: | ||
|
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: git-release | ||
name: release-git | ||
|
||
on: | ||
push: # Ensure a new release is created for each new tag | ||
|
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: site-release | ||
name: release-site | ||
|
||
on: | ||
release: | ||
|
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 |
---|---|---|
|
@@ -24,5 +24,5 @@ jobs: | |
name: Install dependencies | ||
run: npm ci | ||
- | ||
name: Run units | ||
name: Run unit tests | ||
run: npm run test:unit |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.