-
Notifications
You must be signed in to change notification settings - Fork 83
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
Showing
4 changed files
with
2,499 additions
and
1,878 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,44 @@ | ||
name: 'Merge to main' | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
env: | ||
NPM_VERSION: latest | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [14.x] | ||
|
||
steps: | ||
- name: Get branch name (merge) | ||
if: github.event_name != 'pull_request' | ||
shell: bash | ||
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV | ||
|
||
- name: Get branch name (pull request) | ||
if: github.event_name == 'pull_request' | ||
shell: bash | ||
run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV | ||
|
||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install latest npm | ||
run: | | ||
npm install -g npm@$NPM_VERSION && | ||
npm --version && | ||
npm list -g --depth 0 | ||
- run: npm ci | ||
- run: npm run test-ci | ||
env: | ||
COVERALLS_SERVICE_NAME: GithubActions | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
COVERALLS_GIT_BRANCH: ${{ env.BRANCH_NAME }} |
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,52 @@ | ||
name: 'Pull Request' | ||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
env: | ||
NPM_VERSION: latest | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [14, 16, 18] | ||
name: Node ${{ matrix.node }} | ||
steps: | ||
- name: 'Checkout latest code' | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Set up node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- name: Install latest npm | ||
run: | | ||
npm install -g npm@$NPM_VERSION && | ||
npm --version && | ||
npm list -g --depth 0 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run tests | ||
run: npm run test | ||
|
||
lint: | ||
name: 'ESLint' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout latest code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Set up node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run ESLint | ||
run: npm run lint |
Oops, something went wrong.