Skip to content

Commit

Permalink
Multi job.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lomilar committed Sep 25, 2024
1 parent b70aca3 commit 1eda290
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 17 deletions.
67 changes: 60 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,75 @@ on:
branches: [ "master", "1.5", "1.6" ]

jobs:
build:
test15:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}

uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run test15
test15Fips:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}

uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run test15Fips
test15Https11:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}

uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run test15Https11
test15Https:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}

strategy:
fail-fast: true
matrix:
node-version: [22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run test15Https
test15Https11Fips:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}

uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run test15Https11Fips
test15HttpsFips:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}

uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run testActionCypress
- run: npm run test15HttpsFips
26 changes: 16 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,30 @@
"description": "Competency and Skills Service",
"main": "index.js",
"scripts": {
"test": "npm run test15Https11 && npm run test15Https && npm run test15",
"test": "concurrently --kill-others --kill-others-on-fail \"npm run test15HttpsFips\" \"npm run test15Https11Fips\" \"npm run test15Https\" \"npm run test15Https11\" \"npm run test15Fips\" \"npm run test15\"",
"testActionCypress": "npm run testkill && export CASS_LOOPBACK=http://cass-test15/api/|| set CASS_LOOPBACK=http://cass-test15/api/&& npm run testkill15 && docker run -d --network cass-net -e CASS_LOOPBACK --name cass-test15 -p80:80 cassproject/cass:1.5.65 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\"",
"testCustom": "npm run test14 && npm run test13 && npm run test12",
"multitest": "concurrently --kill-others --kill-others-on-fail \"npm run test15\" \"npm run test14\" \"npm run test13\" \"npm run test12\"",
"testCassTest": "npm run testkill && docker run -d --network cass-net --name cass-test -p80:80 -e CASS_LOOPBACK cass-test && wait-on http://localhost/api/ping && npm run testNode18 && npm run testNode18Fips && npm run testNode16 && npm run testNode15 && npm run testNode14 && npm run testNode13 && npm run testNode12 && npm run testCypressEdge && npm run testCypress && npm run testkill",
"testDevHttps": "npm run testkill && docker run -d --network cass-net --name cass-test -p443:80 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:dev && wait-on https://localhost/api/ping && npm run testNode18HttpsFips && npm run testNode18Https && npm run testNode16Https && npm run testNode15Https && npm run testNode14Https && npm run testNode13Https && npm run testNode12Https && npm run testCypressEdgeHttps && npm run testCypressHttps",
"test15HttpsFips": "export CASS_LOOPBACK=https://cass-test/api/|| set CASS_LOOPBACK=https://cass-test/api/&& npm run testkill && docker run -d --network cass-net --name cass-test -p443:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.5.65 && wait-on https://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode20HttpsForceFips\" \"npm run testNode18Https\" \"npm run testNode18HttpsFips\" \"npm run testNode16Https\" && npm run testkill",
"test15Https11Fips": "export CASS_LOOPBACK=https://cass-test/api/|| set CASS_LOOPBACK=https://cass-test/api/&& npm run testkill && docker run -d --network cass-net --name cass-test -p443:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.5.65 && wait-on https://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode20HttpsForceFips\" \"npm run testNode18Https\" \"npm run testNode18HttpsFips\" \"npm run testNode16Https\" && npm run testkill",
"test15Https": "export CASS_LOOPBACK=https://cass-test/api/|| set CASS_LOOPBACK=https://cass-test/api/&& npm run testkill && docker run -d --network cass-net --name cass-test -p443:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.5.65 && wait-on https://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode18Https\" \"npm run testNode18HttpsFips\" \"npm run testNode16Https\" && npm run testkill",
"test15Https11": "export CASS_LOOPBACK=https://cass-test/api/|| set CASS_LOOPBACK=https://cass-test/api/&& npm run testkill && docker run -d --network cass-net --name cass-test -p443:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.5.65 && wait-on https://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode18Https\" \"npm run testNode18HttpsFips\" \"npm run testNode16Https\" && npm run testkill",
"test15Fips": "export CASS_LOOPBACK=http://cass-test15/api/|| set CASS_LOOPBACK=http://cass-test15/api/&& npm run testkill15 && docker run -d --network cass-net -e CASS_LOOPBACK --name cass-test15 -p80:80 cassproject/cass:1.5.65 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode20\" \"npm run testNode20Fips\" \"npm run testNode20ForceFips\" \"npm run testNode18\" \"npm run testNode18Fips\" \"npm run testNode16\" && npm run testkill15",
"test15HttpsFips": "export CASS_LOOPBACK=https://cass-testsf15/api/|| set CASS_LOOPBACK=https://cass-testsf15/api/&& npm run testkill && docker run -d --network cass-net --name cass-testsf15 -p443:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.5.65 && wait-on https://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode20HttpsForceFips\" \"npm run testNode18Https\" \"npm run testNode18HttpsFips\" \"npm run testNode16Https\" && npm run testkill",
"test15Https11Fips": "export CASS_LOOPBACK=https://cass-testsf1115/api/|| set CASS_LOOPBACK=https://cass-testsf1115/api/&& npm run testkill && docker run -d --network cass-net --name cass-testsf1115 -p443:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.5.65 && wait-on https://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode20HttpsForceFips\" \"npm run testNode18Https\" \"npm run testNode18HttpsFips\" \"npm run testNode16Https\" && npm run testkill",
"test15Https": "export CASS_LOOPBACK=https://cass-tests15/api/|| set CASS_LOOPBACK=https://cass-tests15/api/&& npm run testkill && docker run -d --network cass-net --name cass-tests15 -p443:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.5.65 && wait-on https://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode18Https\" \"npm run testNode18HttpsFips\" \"npm run testNode16Https\" && npm run testkill",
"test15Https11": "export CASS_LOOPBACK=https://cass-tests1115/api/|| set CASS_LOOPBACK=https://cass-tests1115/api/&& npm run testkill && docker run -d --network cass-net --name cass-tests1115 -p443:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.5.65 && wait-on https://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode18Https\" \"npm run testNode18HttpsFips\" \"npm run testNode16Https\" && npm run testkill",
"test15Fips": "export CASS_LOOPBACK=http://cass-testf15/api/|| set CASS_LOOPBACK=http://cass-testf15/api/&& npm run testkillf15 && docker run -d --network cass-net -e CASS_LOOPBACK --name cass-testf15 -p80:80 cassproject/cass:1.5.65 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode20\" \"npm run testNode20Fips\" \"npm run testNode20ForceFips\" \"npm run testNode18\" \"npm run testNode18Fips\" \"npm run testNode16\" && npm run testkill15",
"test15": "export CASS_LOOPBACK=http://cass-test15/api/|| set CASS_LOOPBACK=http://cass-test15/api/&& npm run testkill15 && docker run -d --network cass-net -e CASS_LOOPBACK --name cass-test15 -p80:80 cassproject/cass:1.5.65 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode20\" \"npm run testNode20Fips\" \"npm run testNode18\" \"npm run testNode18Fips\" \"npm run testNode16\" && npm run testkill15",
"test14": "npm run testkill14 && docker run -d --network cass-net -e CASS_LOOPBACK --name cass-test14 -p80:80 cassproject/cass:1.4.4 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode16\" && npm run testkill14",
"test13": "npm run testkill13 && docker run -d --network cass-net -e CASS_LOOPBACK --name cass-test13 -p80:80 cassproject/cass:1.3.18 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode16\" && npm run testkill13",
"test12": "npm run testkill12 && docker run -d --network cass-net -e CASS_LOOPBACK --name cass-test12 -p80:80 cassproject/cass:1.2.44 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode16\" && npm run testkill12",
"testkill15": "docker kill cass-test15 | exit 0 && docker rm cass-test15 | exit 0",
"testkill14": "docker kill cass-test14 | exit 0 && docker rm cass-test14 | exit 0",
"testkill13": "docker kill cass-test13 | exit 0 && docker rm cass-test13 | exit 0",
"testkill12": "docker kill cass-test12 | exit 0 && docker rm cass-test12 | exit 0",
"testkillsf15": "docker kill cass-testsf15 | exit 0 && docker rm cass-testsf15 | exit 0 && docker network create cass-net | exit 0",
"testkillsf1115": "docker kill cass-testsf1115 | exit 0 && docker rm cass-testsf1115 | exit 0 && docker network create cass-net | exit 0",
"testkills15": "docker kill cass-tests15 | exit 0 && docker rm cass-tests15 | exit 0 && docker network create cass-net | exit 0",
"testkills1115": "docker kill cass-tests1115 | exit 0 && docker rm cass-tests1115 | exit 0 && docker network create cass-net | exit 0",
"testkillf15": "docker kill cass-testf15 | exit 0 && docker rm cass-testf15 | exit 0 && docker network create cass-net | exit 0",
"testkill15": "docker kill cass-test15 | exit 0 && docker rm cass-test15 | exit 0 && docker network create cass-net | exit 0",
"testkill14": "docker kill cass-test14 | exit 0 && docker rm cass-test14 | exit 0 && docker network create cass-net | exit 0",
"testkill13": "docker kill cass-test13 | exit 0 && docker rm cass-test13 | exit 0 && docker network create cass-net | exit 0",
"testkill12": "docker kill cass-test12 | exit 0 && docker rm cass-test12 | exit 0 && docker network create cass-net | exit 0",
"testkill": "docker kill cass-test | exit 0 && docker rm cass-test | exit 0 && docker network create cass-net | exit 0",
"testNode21Https": "docker build --progress plain -f docker/node21https -t npm-cass21https . && docker run --network cass-net -e CASS_LOOPBACK --rm npm-cass21https",
"testNode20": "docker build --progress plain -f docker/node20 -t npm-cass20 . && docker run --network cass-net -e CASS_LOOPBACK --rm npm-cass20",
Expand Down Expand Up @@ -54,6 +59,7 @@
"mocha:httpsNoHttp2": "export HTTP2=false|| set HTTP2=false&& mocha --timeout 30000 -b src/**/*.test.js",
"mocha:https": "mocha --timeout 30000 -b src/**/*.test.js",
"mocha:clientSideCertificates": "export NODE_EXTRA_CA_CERTS=ca.crt|| set NODE_EXTRA_CA_CERTS=ca.crt&&export HTTP2=false|| set HTTP2=false&& mocha --timeout 30000 -b src/**/*.test.js",
"mochaFips:clientSideCertificates": "export NODE_EXTRA_CA_CERTS=ca.crt|| set NODE_EXTRA_CA_CERTS=ca.crt&&export HTTP2=false|| set HTTP2=false&& mocha -n 'force-fips' --timeout 30000 -b src/**/*.test.js",
"mocha:clientSideCertificatesDangerMouse": "export NODE_EXTRA_CA_CERTS=ca.crt|| set NODE_EXTRA_CA_CERTS=ca.crt&&export HTTP2=false|| set HTTP2=false&& mocha --timeout 30000 -b src/**/*.test.js",
"mocha:custom": "export CASS_LOOPBACK=https://tides.eduworks.us/api/|| set CASS_LOOPBACK=https://tides.eduworks.us/api/&& export HTTP2=false|| set HTTP2=false&& mocha --timeout 300000 -b src/**/*.test.js",
"mocha:dev": "export CASS_LOOPBACK=https://dev.cassproject.org/api/|| set CASS_LOOPBACK=https://dev.cassproject.org/api/&& export HTTP2=false|| set HTTP2=false&& mocha --timeout 300000 -b src/**/*.test.js",
Expand Down

0 comments on commit 1eda290

Please sign in to comment.