From 0b1adbdae4fd8ffce48dedce6ff785da11f538c0 Mon Sep 17 00:00:00 2001 From: Mitchell Elholm Date: Thu, 15 May 2025 18:17:17 -0700 Subject: [PATCH 1/2] Add Postgres-js CI --- .../javascript-postgresjs-integ-tests.yml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/javascript-postgresjs-integ-tests.yml diff --git a/.github/workflows/javascript-postgresjs-integ-tests.yml b/.github/workflows/javascript-postgresjs-integ-tests.yml new file mode 100644 index 00000000..b1650612 --- /dev/null +++ b/.github/workflows/javascript-postgresjs-integ-tests.yml @@ -0,0 +1,56 @@ +name: Postgres-js integration tests + +on: + push: + branches: [ main ] + paths: + - 'javascript/postgres-js/**' + - '.github/workflows/javascript-postgresjs-integ-tests.yml' + pull_request: + branches: [ main ] + paths: + - 'javascript/postgres-js/**' + - '.github/workflows/javascript-postgresjs-integ-tests.yml' + # Give us a button to allow running the workflow on demand for testing. + workflow_dispatch: + inputs: + tags: + description: 'Manual Workflow Run' + required: false + type: string + +jobs: + postgresjs-integ-test: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + # Explicitly set permissions, following the principle of least privilege + actions: read + checks: write + pull-requests: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '18.x' + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.JAVASCRIPT_IAM_ROLE }} + aws-region: us-east-1 + + - name: Configure and run integration for nodejs HowTo + working-directory: ./javascript/postgres-js + env: + CLUSTER_ENDPOINT: ${{ secrets.JAVASCRIPT_POSTGRESJS_CLUSTER_ENDPOINT }} + REGION: ${{ secrets.JAVASCRIPT_POSTGRESJS_CLUSTER_REGION }} + CLUSTER_USER: 'admin' + run: | + npm install + npm test From 4b9d2259648965f28c9c62dcf1138b8c6971dc70 Mon Sep 17 00:00:00 2001 From: Mitchell Elholm Date: Fri, 16 May 2025 10:31:34 -0700 Subject: [PATCH 2/2] Update node version --- .github/workflows/javascript-postgresjs-integ-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/javascript-postgresjs-integ-tests.yml b/.github/workflows/javascript-postgresjs-integ-tests.yml index b1650612..f54ad144 100644 --- a/.github/workflows/javascript-postgresjs-integ-tests.yml +++ b/.github/workflows/javascript-postgresjs-integ-tests.yml @@ -37,7 +37,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v4 with: - node-version: '18.x' + node-version: '22.x' - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4