Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from joe-castle/feature-29-github-actions
ci(travis): upgrading from Travis to GitHub Actions
- Loading branch information
Showing
4 changed files
with
253 additions
and
69 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,32 @@ | ||
name: Release | ||
|
||
on: | ||
pull_request: | ||
types: [ closed ] | ||
branches: [ master ] | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
|
||
runs-on: ubuntu-latest | ||
|
||
if: ${{ github.event.pull_request.merged }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 15 | ||
- name: Install dependencies | ||
run: npm ci | ||
- uses: actions/download-artifact@v2 | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npx semantic-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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Test, Build and Report Coverage | ||
|
||
on: | ||
push: | ||
branches: [ master, deploy, feature/*, fix/*, release/* ] | ||
pull_request: | ||
branches: [ master, deploy ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [10.x, 12.x, 14.x, 15.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Lint source files | ||
run: npm run lint | ||
- name: Run tests and produce coverage | ||
run: npm run test:coverage | ||
- name: Build source files | ||
run: npm run build | ||
- uses: actions/upload-artifact@v2 | ||
if: ${{ success() && github.ref == 'refs/heads/master' }} | ||
path: | | ||
dist/** | ||
lib/** | ||
es/** | ||
types/** | ||
- name: Coveralls report | ||
uses: coverallsapp/github-action@v1.1.2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: ./coverage/lcov.info |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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