diff --git a/.github/workflows/plugins-benchmark-pr.yml b/.github/workflows/plugins-benchmark-pr.yml index 8770b66..463d988 100644 --- a/.github/workflows/plugins-benchmark-pr.yml +++ b/.github/workflows/plugins-benchmark-pr.yml @@ -41,6 +41,8 @@ jobs: benchmark: if: ${{ github.event.label.name == 'benchmark' }} runs-on: ubuntu-latest + env: + NPM_SCRIPT: ${{ inputs.npm-script }} permissions: contents: read outputs: @@ -73,10 +75,12 @@ jobs: - name: Run benchmark ${{ inputs.pr-repo }}@${{ inputs.pr-ref }} id: benchmark-pr + env: + NODE_VERSION: ${{ matrix.node-version }} run: | - echo 'BENCH_RESULT_${{matrix.node-version}}<> $GITHUB_OUTPUT - npm run --silent ${{inputs.npm-script}} >> $GITHUB_OUTPUT - echo 'EOF' >> $GITHUB_OUTPUT + echo "BENCH_RESULT_${NODE_VERSION}<> "$GITHUB_OUTPUT" + npm run --silent "$NPM_SCRIPT" >> "$GITHUB_OUTPUT" + echo 'EOF' >> "$GITHUB_OUTPUT" - name: Checkout ${{ inputs.base-repo }}@${{ inputs.base-ref }} uses: actions/checkout@v4 @@ -91,10 +95,12 @@ jobs: - name: Run benchmark ${{ inputs.base-repo }}@${{ inputs.base-ref }} id: benchmark-base + env: + NODE_VERSION: ${{ matrix.node-version }} run: | - echo 'BENCH_RESULT_${{matrix.node-version}}<> $GITHUB_OUTPUT - npm run --silent ${{inputs.npm-script}} >> $GITHUB_OUTPUT - echo 'EOF' >> $GITHUB_OUTPUT + echo "BENCH_RESULT_${NODE_VERSION}<> "$GITHUB_OUTPUT" + npm run --silent "$NPM_SCRIPT" >> "$GITHUB_OUTPUT" + echo 'EOF' >> "$GITHUB_OUTPUT" output-benchmark: needs: benchmark diff --git a/.github/workflows/plugins-ci-elasticsearch.yml b/.github/workflows/plugins-ci-elasticsearch.yml index b3a89a2..f44571a 100644 --- a/.github/workflows/plugins-ci-elasticsearch.yml +++ b/.github/workflows/plugins-ci-elasticsearch.yml @@ -74,8 +74,9 @@ jobs: run: npm i --ignore-scripts - name: Check Licenses - run: ${{ format('npx license-checker --production --summary --onlyAllow="0BSD;Apache-2.0;BlueOak-1.0.0;BSD-2-Clause;BSD-3-Clause;ISC;MIT;{0}"', inputs.license-check-allowed-additional) }} - + env: + ALLOWED_ADDITIONAL: ${{ inputs.license-check-allowed-additional }} + run: npx license-checker --production --summary --onlyAllow="0BSD;Apache-2.0;BlueOak-1.0.0;BSD-2-Clause;BSD-3-Clause;ISC;MIT;$ALLOWED_ADDITIONAL" linter: name: Lint Code if: > diff --git a/.github/workflows/plugins-ci-kafka.yml b/.github/workflows/plugins-ci-kafka.yml index 0fc19d2..0c485eb 100644 --- a/.github/workflows/plugins-ci-kafka.yml +++ b/.github/workflows/plugins-ci-kafka.yml @@ -69,8 +69,9 @@ jobs: run: npm i --ignore-scripts - name: Check Licenses - run: ${{ format('npx license-checker --production --summary --onlyAllow="0BSD;Apache-2.0;BlueOak-1.0.0;BSD-2-Clause;BSD-3-Clause;ISC;MIT;{0}"', inputs.license-check-allowed-additional) }} - + env: + ALLOWED_ADDITIONAL: ${{ inputs.license-check-allowed-additional }} + run: npx license-checker --production --summary --onlyAllow="0BSD;Apache-2.0;BlueOak-1.0.0;BSD-2-Clause;BSD-3-Clause;ISC;MIT;$ALLOWED_ADDITIONAL" linter: name: Lint Code if: > diff --git a/.github/workflows/plugins-ci-mongo.yml b/.github/workflows/plugins-ci-mongo.yml index 23ba752..c8d3808 100644 --- a/.github/workflows/plugins-ci-mongo.yml +++ b/.github/workflows/plugins-ci-mongo.yml @@ -69,7 +69,9 @@ jobs: run: npm i --ignore-scripts - name: Check Licenses - run: ${{ format('npx license-checker --production --summary --onlyAllow="0BSD;Apache-2.0;BlueOak-1.0.0;BSD-2-Clause;BSD-3-Clause;ISC;MIT;{0}"', inputs.license-check-allowed-additional) }} + env: + ALLOWED_ADDITIONAL: ${{ inputs.license-check-allowed-additional }} + run: npx license-checker --production --summary --onlyAllow="0BSD;Apache-2.0;BlueOak-1.0.0;BSD-2-Clause;BSD-3-Clause;ISC;MIT;$ALLOWED_ADDITIONAL" linter: name: Lint Code diff --git a/.github/workflows/plugins-ci-mysql.yml b/.github/workflows/plugins-ci-mysql.yml index d1cc443..0144fdd 100644 --- a/.github/workflows/plugins-ci-mysql.yml +++ b/.github/workflows/plugins-ci-mysql.yml @@ -69,7 +69,9 @@ jobs: run: npm i --ignore-scripts - name: Check Licenses - run: ${{ format('npx license-checker --production --summary --onlyAllow="0BSD;Apache-2.0;BlueOak-1.0.0;BSD-2-Clause;BSD-3-Clause;ISC;MIT;{0}"', inputs.license-check-allowed-additional) }} + env: + ALLOWED_ADDITIONAL: ${{ inputs.license-check-allowed-additional }} + run: npx license-checker --production --summary --onlyAllow="0BSD;Apache-2.0;BlueOak-1.0.0;BSD-2-Clause;BSD-3-Clause;ISC;MIT;$ALLOWED_ADDITIONAL" linter: name: Lint Code diff --git a/.github/workflows/plugins-ci-postgres.yml b/.github/workflows/plugins-ci-postgres.yml index 22c1c81..d476a4c 100644 --- a/.github/workflows/plugins-ci-postgres.yml +++ b/.github/workflows/plugins-ci-postgres.yml @@ -69,7 +69,9 @@ jobs: run: npm i --ignore-scripts - name: Check Licenses - run: ${{ format('npx license-checker --production --summary --onlyAllow="0BSD;Apache-2.0;BlueOak-1.0.0;BSD-2-Clause;BSD-3-Clause;ISC;MIT;{0}"', inputs.license-check-allowed-additional) }} + env: + ALLOWED_ADDITIONAL: ${{ inputs.license-check-allowed-additional }} + run: npx license-checker --production --summary --onlyAllow="0BSD;Apache-2.0;BlueOak-1.0.0;BSD-2-Clause;BSD-3-Clause;ISC;MIT;$ALLOWED_ADDITIONAL" linter: name: Lint Code @@ -136,6 +138,8 @@ jobs: run: npm i - name: CI environment setup + env: + PGPORT: ${{ job.services.postgres.ports[5432] }} run: > npm i node-gyp @@ -143,8 +147,7 @@ jobs: chmod 600 .pgpass - PGPASSFILE=.pgpass psql -h localhost -p ${{ - job.services.postgres.ports[5432] }} -d postgres -c 'CREATE TABLE + PGPASSFILE=.pgpass psql -h localhost -p "$PGPORT" -d postgres -c 'CREATE TABLE users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);' -U postgres diff --git a/.github/workflows/plugins-ci-redis.yml b/.github/workflows/plugins-ci-redis.yml index f5f8450..b135d15 100644 --- a/.github/workflows/plugins-ci-redis.yml +++ b/.github/workflows/plugins-ci-redis.yml @@ -69,7 +69,9 @@ jobs: run: npm i --ignore-scripts - name: Check Licenses - run: ${{ format('npx license-checker --production --summary --onlyAllow="0BSD;Apache-2.0;BlueOak-1.0.0;BSD-2-Clause;BSD-3-Clause;ISC;MIT;{0}"', inputs.license-check-allowed-additional) }} + env: + ALLOWED_ADDITIONAL: ${{ inputs.license-check-allowed-additional }} + run: npx license-checker --production --summary --onlyAllow="0BSD;Apache-2.0;BlueOak-1.0.0;BSD-2-Clause;BSD-3-Clause;ISC;MIT;$ALLOWED_ADDITIONAL" linter: name: Lint Code diff --git a/.github/workflows/plugins-ci.yml b/.github/workflows/plugins-ci.yml index 145ff91..d83510d 100644 --- a/.github/workflows/plugins-ci.yml +++ b/.github/workflows/plugins-ci.yml @@ -74,7 +74,9 @@ jobs: run: npm i --ignore-scripts - name: Check Licenses - run: ${{ format('npx license-checker --production --summary --onlyAllow="0BSD;Apache-2.0;BlueOak-1.0.0;BSD-2-Clause;BSD-3-Clause;ISC;MIT;{0}"', inputs.license-check-allowed-additional) }} + env: + ALLOWED_ADDITIONAL: ${{ inputs.license-check-allowed-additional }} + run: npx license-checker --production --summary --onlyAllow="0BSD;Apache-2.0;BlueOak-1.0.0;BSD-2-Clause;BSD-3-Clause;ISC;MIT;$ALLOWED_ADDITIONAL" linter: name: Lint Code @@ -170,7 +172,7 @@ jobs: git clone https://github.com/fastify/fastify.git --depth 1 && cd fastify && npm i --ignore-scripts && - npm link $PACKAGE_NAME && + npm link "$PACKAGE_NAME" && npm run unit automerge: