Skip to content

Commit c6b8bd8

Browse files
authored
Merge pull request #107 from edx/aht/BOM-2931-replace-travis-with-github-actions
BOM-2931: Replace Travis with GitHub CI
2 parents f97e311 + 0aa0d34 commit c6b8bd8

File tree

4 files changed

+75
-23
lines changed

4 files changed

+75
-23
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Node CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- "**"
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-20.04
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: Setup Nodejs
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: 8
22+
23+
- name: Install Dependencies
24+
run: npm ci
25+
26+
- name: Lint
27+
run: npm run lint
28+
29+
- name: Build
30+
run: npm run build
31+
32+
- name: Send failure notification
33+
if: ${{ failure() }}
34+
uses: dawidd6/action-send-mail@v3
35+
with:
36+
server_address: email-smtp.us-east-1.amazonaws.com
37+
server_port: 465
38+
username: ${{secrets.EDX_SMTP_USERNAME}}
39+
password: ${{secrets.EDX_SMTP_PASSWORD}}
40+
subject: CI workflow failed in ${{github.repository}}
41+
42+
from: github-actions <[email protected]>
43+
body: CI workflow in ${{github.repository}} failed! For details see "github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"

.github/workflows/npm-publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v2
19+
with:
20+
node-version: 12
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Create Build
26+
run: npm run build
27+
28+
- name: Release Package
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}
31+
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }}
32+
run: npm run semantic-release

.npmignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.edx-bootstrap
22
.gitignore
33
.npmignore
4-
.travis.yml
54
_config.yml
65
doc
76
node_modules

.travis.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)