ci: Do not persist credentials after checkout #77
Workflow file for this run
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: Test | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: ${{ matrix.os }}, Node.js ${{ matrix.node-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# Oldest supported LTS version through current LTS | |
node-version: [12.x, 14.x, 16.x] | |
# NOTE: Old versions aren't available for mac-arm64, so we use macos-13 | |
# (the last CI image based on x64 hardware) | |
os: [macos-13, windows-latest, ubuntu-latest] | |
fail-fast: false | |
steps: | |
- name: Configure git | |
run: git config --global core.autocrlf false | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
persist-credentials: false | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
# Default Java on macos-13 seems to have an issue with building our jar | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: 11 | |
- name: Install deps | |
shell: bash | |
run: | | |
# npm v7+ (node v16+) has "workspaces" support, which is very useful | |
# for this project. But since we're testing unmerged code on many | |
# older versions of node, we have to upgrade npm to a version that | |
# supports the workspace definitions in our package locks. | |
npm install -g npm@8 | |
# Install root level, shared dependencies, which are necessary for | |
# eslint. | |
npm ci | |
for i in base backends/*; do | |
# Install dependencies for each module. | |
npm --prefix "$i" ci | |
done | |
- name: Build Selenium DriverProvider JAR | |
run: cd base && npm run jar | |
- name: Test all packages | |
shell: bash | |
run: | | |
for i in base backends/*; do | |
npm --prefix "$i" test | |
done |