-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
7154bdf
commit 009dfb2
Showing
1 changed file
with
54 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,54 @@ | ||
# This workflow will run tests for npm and java | ||
|
||
name: checks | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
# using filter pattern: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet | ||
- '[cC][0-9][0-9][0-9]-+**' # c123 or c123-something for custom branch | ||
- '[0-9][0-9][0-9][0-9].[0-9][0-9].xx' # stable brances. E.g. 2021.01.xx | ||
pull_request: | ||
branches: | ||
- master | ||
# using filter pattern: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet | ||
- '[cC][0-9][0-9][0-9]-+**' # c123 or c123-something for custom branch | ||
- '[0-9][0-9][0-9][0-9].[0-9][0-9].xx' # stable brances. E.g. 2021.01.xx | ||
|
||
jobs: | ||
checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "checking out" | ||
uses: actions/checkout@v2 | ||
- name: "Checkout submodules" | ||
run: git submodule update --init --recursive | ||
|
||
- name: "setting up npm" | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '12.x' | ||
|
||
############### | ||
# NPM CHECKS | ||
############# | ||
- name: npm install | ||
run: npm install | ||
|
||
- name: ESlint | ||
run: npm run lint | ||
|
||
- name: Unit Tests | ||
run: npm test -- --reporters mocha,coverage,coveralls | ||
|
||
- name: build | ||
run: npm run ext:build | ||
|
||
- name: 'Upload Artifact' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Artifacts | ||
path: dist/SampleExtension.zip | ||
retention-days: 5 | ||
|