Bump nanoid and mocha #251
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Review - Group Build & Test (on pull) | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
load-build-group: | |
name: Load Build Group Config JSON | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Checkout ${{ github.ref }} | |
uses: actions/checkout@v2 | |
# build with the lowest versions of the OSs supported. | |
# ensures the glibc/musl versions are the oldest/most compatible. | |
- name: Load build group data | |
id: set-matrix | |
run: .github/scripts/matrix-from-json.sh .github/config/build-group.json | |
build-group-test: | |
name: Build Group Test | |
runs-on: ubuntu-latest | |
needs: load-build-group | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJson(needs.load-build-group.outputs.matrix) }} | |
container: | |
image: ${{ matrix.image }} | |
env: | |
APPOPTICS_SERVICE_KEY: ${{ secrets.APPOPTICS_SERVICE_KEY }} | |
APPOPTICS_COLLECTOR: ${{ secrets.APPOPTICS_COLLECTOR }} | |
AO_TEST_PROD_SERVICE_KEY: ${{ secrets.AO_TEST_PROD_SERVICE_KEY }} | |
steps: | |
# the working directory is created by the runner and mounted to the container. | |
# container user is root and the runner is not a user in the container. | |
# this is a github actions design flaw. | |
# when npm 7 is run as root, scripts are always run with the effective uid and gid of the working directory owner. | |
# node 16 can't install under default setup. | |
# specifying workdir for container and path for checkout does not work due to bug. | |
- name: Change Owner of Container Working Directory | |
run: chown root:root . | |
- name: Checkout ${{ github.ref }} | |
uses: actions/checkout@v2 | |
- name: Show Environment Info | |
run: | | |
printenv | |
node --version | |
npm --version | |
cat /etc/os-release | |
# must install specific dependencies before a build | |
# can't call npm install. doing so may fallback-to-build if package has yet to be published (double build) | |
# use npm workaround specifying a package name to bypass install script in package.json | |
- name: NPM Install dependencies | |
run: npm install linux-os-info --unsafe-perm | |
# runs: node setup-liboboe.js && node-pre-gyp install --build-from-source | |
- name: NPM Install with Rebuild from source | |
run: npm run rebuild | |
- name: Run tests | |
run: npm test | |
checksum: | |
name: Checksum Liboboe | |
runs-on: ubuntu-latest | |
needs: build-group-test | |
steps: | |
- name: Checkout ${{ github.ref }} | |
uses: actions/checkout@v2 | |
- name: Checksum Liboboe | |
run: .github/scripts/liboboe-checksum.sh "liboboe-1.0-x86_64.so.0.0.0 liboboe-1.0-alpine-x86_64.so.0.0.0 liboboe-1.0-lambda-x86_64.so.0.0.0" | |