From 884651a7027a0b79810f2fb203ac54962fcfbca6 Mon Sep 17 00:00:00 2001 From: stvn Date: Wed, 2 Jun 2021 00:04:48 -0700 Subject: [PATCH] build(ci): convert travis-ci to github actions tickets ======= - Fixes CENG-108 - Fixes stvstnfrd/openedx-meta#156 --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ .travis.yml | 15 --------------- Makefile | 14 ++++++++++++++ README.rst | 7 ++++--- 4 files changed, 44 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100755 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a9e6f7c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +--- +name: ci +on: + push: + branches: + - master + pull_request: +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: + - 12 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm install -g npm@6 + - run: make requirements.ci + - run: make test + - name: upload coverage + uses: codecov/codecov-action@v1 + with: + fail_ci_if_error: false diff --git a/.travis.yml b/.travis.yml deleted file mode 100755 index 92b984a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: node_js -node_js: 12 -before_install: -- npm install -g npm@6 -install: -- npm ci -script: -- make validate-no-uncommitted-package-lock-changes -- npm run i18n_extract -- npm run lint -- npm run test -- npm run build -- npm run is-es5 -after_success: -- codecov diff --git a/Makefile b/Makefile index fddfef0..c09dcdd 100755 --- a/Makefile +++ b/Makefile @@ -13,6 +13,20 @@ transifex_temp = ./temp/babel-plugin-react-intl requirements: npm install +.PHONY: requirements.ci +requirements.ci: ## install ci requirements + npm ci + +NPM_TESTS=i18n_extract lint test build is-es5 + +.PHONY: test +test: $(addprefix test.npm.,$(NPM_TESTS)) ## validate ci suite + +.PHONY: test.npm.* +test.npm.%: validate-no-uncommitted-package-lock-changes + test -d node_modules || $(MAKE) requirements.ci + npm run $(*) + i18n.extract: # Pulling display strings from .jsx files into .json files... rm -rf $(transifex_temp) diff --git a/README.rst b/README.rst index 336efd8..280a6a2 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -|Build Status| |Codecov| |npm_version| |npm_downloads| |license| |semantic-release| +|ci-badge| |Codecov| |npm_version| |npm_downloads| |license| |semantic-release| frontend-app-account ==================== @@ -102,8 +102,9 @@ In the future, it's possible that demographics could be modeled as a plugin rath ============================== -.. |Build Status| image:: https://api.travis-ci.com/edx/frontend-app-account.svg?branch=master - :target: https://travis-ci.com/edx/frontend-app-account +.. |ci-badge| image:: https://github.com/edx/edx-developer-docs/actions/workflows/ci.yml/badge.svg + :target: https://github.com/edx/edx-developer-docs/actions/workflows/ci.yml + :alt: Continuous Integration .. |Codecov| image:: https://img.shields.io/codecov/c/github/edx/frontend-app-account :target: https://codecov.io/gh/edx/frontend-app-account .. |npm_version| image:: https://img.shields.io/npm/v/@edx/frontend-app-account.svg