From 92265b0c5487d223dbcf5e81bae57080cdbd6894 Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Mon, 8 Nov 2021 18:41:59 +0500 Subject: [PATCH] build: Replace Travis with GitHub Actions (#597) --- .github/workflows/ci.yml | 55 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 16 ------------ 2 files changed, 55 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..1fb052c70 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,55 @@ +name: Node CI + +on: + push: + branches: + - master + pull_request: + branches: + - "**" + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Nodejs + uses: actions/setup-node@v2 + with: + node-version: 12 + + - name: Install NPM + run: npm install -g npm + + - name: Install Dependencies + run: npm ci + + - name: Verify No Uncommitted Package-Lock Changes + run: make validate-no-uncommitted-package-lock-changes + + - name: Lint + run: npm run lint + + - name: Test + run: npm run test + + - name: Build + run: npm run build + + - name: Verify Es5 + run: npm run is-es5 + + - name: Send failure notification + if: ${{ failure() }} + uses: dawidd6/action-send-mail@v3 + with: + server_address: email-smtp.us-east-1.amazonaws.com + server_port: 465 + username: ${{secrets.EDX_SMTP_USERNAME}} + password: ${{secrets.EDX_SMTP_PASSWORD}} + subject: CI workflow failed in ${{github.repository}} + to: discovery-squad@edx.org + from: github-actions + body: CI workflow in ${{github.repository}} failed! For details see "github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e2c63c37d..000000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: node_js -node_js: 12 -notifications: - email: - recipients: - - discovery-squad@edx.org - on_success: never - on_failure: always -before_install: -- npm install -g npm -script: -- make validate-no-uncommitted-package-lock-changes -- npm run lint -- npm run test -- npm run build -- npm run is-es5