forked from pimterry/loglevel
-
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.
Add basic CI workflow on GitHub Actions
- Loading branch information
Showing
2 changed files
with
104 additions
and
1 deletion.
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,102 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
pull_request: {} | ||
# push: | ||
# branches: | ||
# - main | ||
push: {} # Just for now testing on a fork; should ultimately only be on pushes to main. | ||
|
||
jobs: | ||
lint: | ||
name: Lint Code | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: JSHint | ||
run: node_modules/.bin/grunt jshint | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build | ||
run: node_modules/.bin/grunt concat uglify | ||
|
||
node-tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node_version: [8, 10, 12, 14, 16, 18, 20] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
cache: npm | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Unit Tests | ||
run: node_modules/.bin/grunt jasmine_node | ||
|
||
browser-tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Unit Tests | ||
run: node_modules/.bin/grunt test | ||
|
||
types: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Typescript Tests | ||
run: npm run test-types |
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