mirror of
https://github.com/github/codeql-action.git
synced 2026-11-09 06:29:52 +00:00
Bumps the actions group with 6 updates in the / directory:
| Package | From | To |
| --- | --- | --- |
| [actions/setup-go](https://github.com/actions/setup-go) | `5` | `6` |
| [actions/github-script](https://github.com/actions/github-script) | `7` | `8` |
| [actions/setup-node](https://github.com/actions/setup-node) | `4` | `5` |
| [ruby/setup-ruby](https://github.com/ruby/setup-ruby) | `1.257.0` | `1.262.0` |
| [actions/create-github-app-token](https://github.com/actions/create-github-app-token) | `2.1.1` | `2.1.4` |
| [actions/setup-python](https://github.com/actions/setup-python) | `5` | `6` |
Updates `actions/setup-go` from 5 to 6
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v5...v6)
Updates `actions/github-script` from 7 to 8
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7...v8)
Updates `actions/setup-node` from 4 to 5
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)
Updates `ruby/setup-ruby` from 1.257.0 to 1.262.0
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](4451173596...cf7216d52f)
Updates `actions/create-github-app-token` from 2.1.1 to 2.1.4
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](https://github.com/actions/create-github-app-token/compare/v2.1.1...v2.1.4)
Updates `actions/setup-python` from 5 to 6
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)
---
updated-dependencies:
- dependency-name: actions/setup-go
dependency-version: '6'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: actions
- dependency-name: actions/github-script
dependency-version: '8'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: actions
- dependency-name: actions/setup-node
dependency-version: '5'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: actions
- dependency-name: ruby/setup-ruby
dependency-version: 1.262.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: actions
- dependency-name: actions/create-github-app-token
dependency-version: 2.1.4
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: actions
- dependency-name: actions/setup-python
dependency-version: '6'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: actions
...
Signed-off-by: dependabot[bot] <support@github.com>
116 lines
3.3 KiB
YAML
116 lines
3.3 KiB
YAML
name: PR Checks
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
|
|
# by other workflows.
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
workflow_dispatch:
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
unit-tests:
|
|
name: Unit Tests
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
permissions:
|
|
contents: read
|
|
security-events: write # needed to upload ESLint results
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 45
|
|
|
|
steps:
|
|
- name: Prepare git (Windows)
|
|
if: runner.os == 'Windows'
|
|
run: git config --global core.autocrlf false
|
|
|
|
- uses: actions/checkout@v5
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v5
|
|
with:
|
|
node-version: '20.x'
|
|
cache: 'npm'
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: 3.11
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
# Use the system Bash shell to ensure we can run commands like `npm ci`
|
|
# that are not available in the default shell on Windows.
|
|
npm config set script-shell bash
|
|
npm ci
|
|
|
|
- name: Verify compiled JS up to date
|
|
run: .github/workflows/script/check-js.sh
|
|
|
|
- name: Verify PR checks up to date
|
|
run: .github/workflows/script/verify-pr-checks.sh
|
|
|
|
- name: Run unit tests
|
|
run: npm test
|
|
|
|
- name: Lint
|
|
if: matrix.os != 'windows-latest'
|
|
run: npm run lint-ci
|
|
|
|
- name: Upload sarif
|
|
uses: github/codeql-action/upload-sarif@v3
|
|
if: matrix.os == 'ubuntu-latest'
|
|
with:
|
|
sarif_file: eslint.sarif
|
|
category: eslint
|
|
|
|
check-node-version:
|
|
if: github.event.pull_request
|
|
name: Check Action Node versions
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
env:
|
|
BASE_REF: ${{ github.base_ref }}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- id: head-version
|
|
name: Verify all Actions use the same Node version
|
|
run: |
|
|
NODE_VERSION=$(find . -name "action.yml" -exec yq -e '.runs.using' {} \; | grep node | sort | uniq)
|
|
echo "NODE_VERSION: ${NODE_VERSION}"
|
|
if [[ $(echo "$NODE_VERSION" | wc -l) -gt 1 ]]; then
|
|
echo "::error::More than one node version used in 'action.yml' files."
|
|
exit 1
|
|
fi
|
|
echo "node_version=${NODE_VERSION}" >> $GITHUB_OUTPUT
|
|
|
|
- id: checkout-base
|
|
name: 'Backport: Check out base ref'
|
|
if: ${{ startsWith(github.head_ref, 'backport-') }}
|
|
uses: actions/checkout@v5
|
|
with:
|
|
ref: ${{ env.BASE_REF }}
|
|
|
|
- name: 'Backport: Verify Node versions unchanged'
|
|
if: steps.checkout-base.outcome == 'success'
|
|
env:
|
|
HEAD_VERSION: ${{ steps.head-version.outputs.node_version }}
|
|
run: |
|
|
BASE_VERSION=$(find . -name "action.yml" -exec yq -e '.runs.using' {} \; | grep node | sort | uniq)
|
|
echo "HEAD_VERSION: ${HEAD_VERSION}"
|
|
echo "BASE_VERSION: ${BASE_VERSION}"
|
|
if [[ "$BASE_VERSION" != "$HEAD_VERSION" ]]; then
|
|
echo "::error::Cannot change the Node version of an Action in a backport PR."
|
|
exit 1
|
|
fi
|