Skip to content

Bump Microsoft.Extensions.Logging.Abstractions from 10.0.9 to 10.0.10 #1050

Bump Microsoft.Extensions.Logging.Abstractions from 10.0.9 to 10.0.10

Bump Microsoft.Extensions.Logging.Abstractions from 10.0.9 to 10.0.10 #1050

Workflow file for this run

# Orchestrates all PR CI by detecting changed paths and conditionally invoking
# per-language workflows. The "gate" job always runs and can be configured as
# the single required status check in GitHub branch protection.
name: CI Gate
permissions: {}
on:
pull_request:
workflow_dispatch:
jobs:
changes:
runs-on: ubuntu-latest
outputs:
java-jdbc: ${{ steps.detect.outputs.java-jdbc }}
go-pgx: ${{ steps.detect.outputs.go-pgx }}
python-connector: ${{ steps.detect.outputs.python-connector }}
node-postgres: ${{ steps.detect.outputs.node-postgres }}
postgres-js: ${{ steps.detect.outputs.postgres-js }}
php-pdo-pgsql: ${{ steps.detect.outputs.php-pdo-pgsql }}
ruby-pg: ${{ steps.detect.outputs.ruby-pg }}
rust-sqlx: ${{ steps.detect.outputs.rust-sqlx }}
dotnet-npgsql: ${{ steps.detect.outputs.dotnet-npgsql }}
steps:
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
id: detect
with:
script: |
const config = {
'java-jdbc': ['java/jdbc/', '.github/workflows/java-jdbc-ci.yml'],
'go-pgx': ['go/pgx/', '.github/workflows/go-pgx-ci.yml'],
'python-connector': ['python/connector/', '.github/workflows/python-connector-ci.yml'],
'node-postgres': ['node/node-postgres/', '.github/workflows/node-postgres-ci.yml'],
'postgres-js': ['node/postgres-js/', '.github/workflows/postgres-js-ci.yml'],
'php-pdo-pgsql': ['php/pdo_pgsql/', '.github/workflows/php-pdo-pgsql-ci.yml'],
'ruby-pg': ['ruby/pg/', '.github/workflows/ruby-pg-ci.yml'],
'rust-sqlx': ['rust/sqlx/', '.github/workflows/rust-sqlx-ci.yml'],
'dotnet-npgsql': ['dotnet/npgsql/', '.github/workflows/dotnet-npgsql-ci.yml'],
};
const runAllPaths = [
'.github/workflows/ci-gate.yml',
'.github/workflows/dsql-cluster-create.yml',
'.github/workflows/dsql-cluster-delete.yml',
'.pre-commit-config.yaml',
];
const pr = context.payload.pull_request;
// Manual dispatch: run all CI
if (!pr) {
for (const name of Object.keys(config)) {
core.setOutput(name, 'true');
}
return;
}
let files = [];
const paginator = github.paginate.iterator(github.rest.pulls.listFiles, {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.number,
per_page: 100,
});
for await (const resp of paginator) {
files.push(...resp.data.map(f => f.filename));
}
// If API truncated results, run everything to be safe
let runAll = files.length < pr.changed_files;
if (!runAll) {
runAll = files.some(f => runAllPaths.some(p => f === p || f.startsWith(p)));
}
for (const [name, paths] of Object.entries(config)) {
const shouldRun = runAll || files.some(f => paths.some(p => f.startsWith(p)));
core.setOutput(name, String(shouldRun));
}
pre-commit:
needs: changes
uses: ./.github/workflows/pre-commit.yml
java-jdbc:
needs: changes
if: needs.changes.outputs.java-jdbc == 'true'
uses: ./.github/workflows/java-jdbc-ci.yml
secrets: inherit
permissions:
id-token: write # required by aws-actions/configure-aws-credentials
go-pgx:
needs: changes
if: needs.changes.outputs.go-pgx == 'true'
uses: ./.github/workflows/go-pgx-ci.yml
secrets: inherit
permissions:
id-token: write # required by aws-actions/configure-aws-credentials
python-connector:
needs: changes
if: needs.changes.outputs.python-connector == 'true'
uses: ./.github/workflows/python-connector-ci.yml
secrets: inherit
permissions:
id-token: write # required by aws-actions/configure-aws-credentials
node-postgres:
needs: changes
if: needs.changes.outputs.node-postgres == 'true'
uses: ./.github/workflows/node-postgres-ci.yml
secrets: inherit
permissions:
id-token: write # required by aws-actions/configure-aws-credentials
postgres-js:
needs: changes
if: needs.changes.outputs.postgres-js == 'true'
uses: ./.github/workflows/postgres-js-ci.yml
secrets: inherit
permissions:
id-token: write # required by aws-actions/configure-aws-credentials
php-pdo-pgsql:
needs: changes
if: needs.changes.outputs.php-pdo-pgsql == 'true'
uses: ./.github/workflows/php-pdo-pgsql-ci.yml
secrets: inherit
permissions:
id-token: write # required by aws-actions/configure-aws-credentials
ruby-pg:
needs: changes
if: needs.changes.outputs.ruby-pg == 'true'
uses: ./.github/workflows/ruby-pg-ci.yml
secrets: inherit
permissions:
id-token: write # required by aws-actions/configure-aws-credentials
rust-sqlx:
needs: changes
if: needs.changes.outputs.rust-sqlx == 'true'
uses: ./.github/workflows/rust-sqlx-ci.yml
secrets: inherit
permissions:
id-token: write # required by aws-actions/configure-aws-credentials
dotnet-npgsql:
needs: changes
if: needs.changes.outputs.dotnet-npgsql == 'true'
uses: ./.github/workflows/dotnet-npgsql-ci.yml
secrets: inherit
permissions:
id-token: write # required by aws-actions/configure-aws-credentials
gate:
name: gate
runs-on: ubuntu-latest
needs:
- pre-commit
- java-jdbc
- go-pgx
- python-connector
- node-postgres
- postgres-js
- php-pdo-pgsql
- ruby-pg
- rust-sqlx
- dotnet-npgsql
if: always()
steps:
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const needs = ${{ toJSON(needs) }};
for (const [job, result] of Object.entries(needs)) {
if (result.result === 'failure' || result.result === 'cancelled') {
core.setFailed(`Job ${job} ${result.result}`);
}
}