mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 09:23:52 -05:00
recombine workflows
This commit is contained in:
@@ -1,13 +1,45 @@
|
||||
name: CE Deploy
|
||||
name: Compiler Explorer
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [ "Compiler Explorer" ]
|
||||
types: [ completed ]
|
||||
on: [ push, pull_request ]
|
||||
|
||||
jobs:
|
||||
build-node:
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
build-and-test:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Use Node.js 12.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
- name: TEST
|
||||
run: |
|
||||
which npx
|
||||
npx --version
|
||||
- name: Get npm cache directory
|
||||
id: npm-cache
|
||||
run: |
|
||||
echo "::set-output name=dir::$(npm config get cache)"
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- name: Install prerequisites
|
||||
run: make prereqs
|
||||
- name: Build and test
|
||||
run: |
|
||||
npm run lint
|
||||
npm run ci-test
|
||||
- name: Code coverage
|
||||
run: npm run codecov
|
||||
|
||||
build-dist-and-deploy:
|
||||
needs: build-and-test
|
||||
if: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
38
.github/workflows/test.yml
vendored
38
.github/workflows/test.yml
vendored
@@ -1,38 +0,0 @@
|
||||
name: Compiler Explorer
|
||||
|
||||
on: [ push, pull_request ]
|
||||
|
||||
jobs:
|
||||
build-node:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Use Node.js 12.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
- name: TEST
|
||||
run: |
|
||||
which npx
|
||||
npx --version
|
||||
- name: Get npm cache directory
|
||||
id: npm-cache
|
||||
run: |
|
||||
echo "::set-output name=dir::$(npm config get cache)"
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- name: Install prerequisites
|
||||
run: make prereqs
|
||||
- name: Build and test
|
||||
run: |
|
||||
npm run lint
|
||||
npm run ci-test
|
||||
- name: Code coverage
|
||||
run: npm run codecov
|
||||
8
Makefile
8
Makefile
@@ -40,9 +40,7 @@ $(NODE_MODULES): package.json | node-installed
|
||||
@touch $@
|
||||
|
||||
WEBPACK:=./node_modules/webpack-cli/bin/cli.js
|
||||
webpack: $(NODE_MODULES) ## Runs webpack (useful only for debugging webpack)
|
||||
rm -rf out/dist/static out/dist/manifest.json
|
||||
$(WEBPACK) $(WEBPACK_ARGS)
|
||||
$(WEBPACK): $(NODE_MODULES)
|
||||
|
||||
lint: $(NODE_MODULES) ## Checks if the source currently matches code conventions
|
||||
$(NPM) run lint
|
||||
@@ -54,7 +52,9 @@ ci-lint: $(NODE_MODULES)
|
||||
$(NPM) run ci-lint
|
||||
|
||||
node_modules: $(NODE_MODULES)
|
||||
webpack: $(WEBPACK)
|
||||
webpack: $(WEBPACK) ## Runs webpack (useful only for debugging webpack)
|
||||
rm -rf out/dist/static out/dist/manifest.json
|
||||
$(WEBPACK) $(WEBPACK_ARGS)
|
||||
|
||||
test: $(NODE_MODULES) ## Runs the tests
|
||||
$(NPM) run test
|
||||
|
||||
Reference in New Issue
Block a user