chore: allowlist more endpoints #1845
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: Node.js Conformance CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
# Declare default permissions as read only. | |
permissions: read-all | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [10, 12, 14, 16, 18, 20] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 | |
with: | |
disable-sudo: true | |
egress-policy: block | |
allowed-endpoints: > | |
api.github.com:443 | |
github.com:443 | |
objects.githubusercontent.com:443 | |
proxy.golang.org:443 | |
registry.npmjs.org:443 | |
storage.googleapis.com:443 | |
sum.golang.org:443 | |
- name: Checkout code | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Build Functions Framework | |
run: npm ci | |
- name: Build test project | |
working-directory: ./test/conformance | |
run: npm install | |
- name: Install conformance client | |
uses: GoogleCloudPlatform/functions-framework-conformance/.github/actions/client/install@72a4f36b10f1c6435ab1a86a9ea24bda464cc262 # v1.8.6 | |
with: | |
client-version: v1.8.3 | |
cache-path: ~/client | |
cache-key: conformance-client-v1.8.3 | |
- name: Run HTTP conformance tests using legacy API | |
working-directory: 'test/conformance' | |
run: | | |
~/client \ | |
-type=http \ | |
-buildpacks=false \ | |
-cmd="npm start -- --target=writeHttp --signature-type=http" | |
- name: Run event conformance tests using legacy API | |
working-directory: 'test/conformance' | |
run: | | |
~/client \ | |
-type=legacyevent \ | |
-buildpacks=false \ | |
-cmd="npm start -- --target=writeLegacyEvent --signature-type=event" | |
- name: Run cloudevent conformance tests using legacy API | |
working-directory: 'test/conformance' | |
run: | | |
~/client \ | |
-type=cloudevent \ | |
-buildpacks=false \ | |
-cmd="npm start -- --target=writeCloudEvent --signature-type=cloudevent" | |
- name: Run HTTP conformance tests using declarative API | |
working-directory: 'test/conformance' | |
run: | | |
~/client \ | |
-type=http \ | |
-buildpacks=false \ | |
-validate-mapping=false \ | |
-cmd="npm start -- --target=writeHttpDeclarative" | |
- name: Run Typed conformance tests using declarative API | |
working-directory: 'test/conformance' | |
run: | | |
~/client \ | |
-type=http \ | |
-declarative-type=typed \ | |
-buildpacks=false \ | |
-validate-mapping=false \ | |
-cmd="npm start -- --target=writeTypedDeclarative" | |
- name: Run cloudevent conformance tests using declarative API | |
working-directory: 'test/conformance' | |
run: | | |
~/client \ | |
-type=cloudevent \ | |
-buildpacks=false \ | |
-validate-mapping=true \ | |
-cmd="npm start -- --target=writeCloudEventDeclarative" | |
- name: Run HTTP concurrency test | |
working-directory: 'test/conformance' | |
run: | | |
~/client \ | |
-type=http \ | |
-buildpacks=false \ | |
-validate-concurrency=true \ | |
-cmd="npm start -- --target=concurrentHttp" |