build(ci): always run npm ci via Makefile
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm install -g npm@6
|
||||
- run: make requirements.ci
|
||||
- run: make requirements
|
||||
- run: make test
|
||||
- name: upload coverage
|
||||
uses: codecov/codecov-action@v1
|
||||
|
||||
13
Makefile
13
Makefile
@@ -10,13 +10,6 @@ tx_url2 = https://www.transifex.com/api/2/project/edx-platform/resource/$(transi
|
||||
# This directory must match .babelrc .
|
||||
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
|
||||
@@ -24,9 +17,13 @@ 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
|
||||
test -d node_modules || $(MAKE) requirements
|
||||
npm run $(*)
|
||||
|
||||
.PHONY: requirements
|
||||
requirements: ## install ci requirements
|
||||
npm ci
|
||||
|
||||
i18n.extract:
|
||||
# Pulling display strings from .jsx files into .json files...
|
||||
rm -rf $(transifex_temp)
|
||||
|
||||
Reference in New Issue
Block a user