test: enable testing for upcoming challenges
This commit is contained in:
101
.github/workflows/node.js-tests-upcoming.yml
vendored
101
.github/workflows/node.js-tests-upcoming.yml
vendored
@ -1,101 +0,0 @@
|
|||||||
name: Node.js CI - Test Upcoming
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
# Treat the below branches as special case for working on workflows
|
|
||||||
- actions-**
|
|
||||||
- upcoming-**
|
|
||||||
schedule:
|
|
||||||
# run this Action every 14 days
|
|
||||||
- cron: '0 * */14 * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
name: Lint
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [14.x]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout Source Files
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
|
|
||||||
- name: Cache node modules
|
|
||||||
uses: actions/cache@v2
|
|
||||||
env:
|
|
||||||
cache-name: cache-node-modules
|
|
||||||
with:
|
|
||||||
# npm cache files are stored in `~/.npm` on Linux/macOS
|
|
||||||
path: ~/.npm
|
|
||||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
|
||||||
${{ runner.os }}-build-
|
|
||||||
${{ runner.os }}-
|
|
||||||
|
|
||||||
- name: Set Environment variables
|
|
||||||
run: |
|
|
||||||
cp sample.env .env
|
|
||||||
echo 'SHOW_UPCOMING_CHANGES=true' >> .env
|
|
||||||
cat .env
|
|
||||||
|
|
||||||
- name: Lint Source Files
|
|
||||||
run: |
|
|
||||||
npm ci
|
|
||||||
npm run ensure-env
|
|
||||||
npm run build:curriculum
|
|
||||||
npm run lint
|
|
||||||
|
|
||||||
test:
|
|
||||||
name: Test
|
|
||||||
needs: lint
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [14.x]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout Source Files
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
|
|
||||||
- name: Cache node modules
|
|
||||||
uses: actions/cache@v2
|
|
||||||
env:
|
|
||||||
cache-name: cache-node-modules
|
|
||||||
with:
|
|
||||||
# npm cache files are stored in `~/.npm` on Linux/macOS
|
|
||||||
path: ~/.npm
|
|
||||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
|
||||||
${{ runner.os }}-build-
|
|
||||||
${{ runner.os }}-
|
|
||||||
|
|
||||||
- name: Set Environment variables
|
|
||||||
run: |
|
|
||||||
cp sample.env .env
|
|
||||||
echo 'SHOW_UPCOMING_CHANGES=true' >> .env
|
|
||||||
cat .env
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: |
|
|
||||||
npm ci
|
|
||||||
npm run ensure-env
|
|
||||||
npm run build:curriculum
|
|
||||||
|
|
||||||
- name: Run Tests
|
|
||||||
run: npm test
|
|
4
.github/workflows/node.js-tests.yml
vendored
4
.github/workflows/node.js-tests.yml
vendored
@ -37,7 +37,9 @@ jobs:
|
|||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
|
|
||||||
- name: Set Environment variables
|
- name: Set Environment variables
|
||||||
run: cp sample.env .env
|
run: |
|
||||||
|
cp sample.env .env
|
||||||
|
echo 'SHOW_UPCOMING_CHANGES=true' >> .env
|
||||||
|
|
||||||
- name: Lint Source Files
|
- name: Lint Source Files
|
||||||
run: |
|
run: |
|
||||||
|
Reference in New Issue
Block a user