Skip to content

Bump the dependencies group with 3 updates #10231

Bump the dependencies group with 3 updates

Bump the dependencies group with 3 updates #10231

Workflow file for this run

name: pr
on: pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
- name: Set up JDK
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
java-version: 21
cache: sbt
- uses: sbt/setup-sbt@6158cb0903b8ceeae04f830055f3155e1b6a5ad7 # v1.5.11
- name: Check formatting
run: sbt --server --batch "scalafmtCheck ; Test/scalafmtCheck"
- run: echo "Previous step failed because code is not formatted. Run 'sbt scalafmt Test/scalafmt'"
if: ${{ failure() }}
- name: Validate CITATION.cff
uses: dieghernan/cff-validator@d8f85828214016ce6976e740b6e0504c0fdc4dbb # v5
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
- name: Fetch base branch with depth 1
run: git fetch --depth=1 origin ${{ github.event.pull_request.base.ref }}:refs/remotes/origin/${{ github.event.pull_request.base.ref }}
- name: Set up JDK
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
java-version: 21
cache: sbt
- uses: sbt/setup-sbt@6158cb0903b8ceeae04f830055f3155e1b6a5ad7 # v1.5.11
- name: Check for lintable changes
id: lintable-changes
run: |
# scalafix bug (https://github.com/scalacenter/scalafix/issues/2505):
# with --diff-base, an empty diff (e.g. a PR that only deletes files)
# is treated like no diff filter at all, so ALL files get linted instead
# of none. Only run scalafix if the PR adds/modifies lintable files.
# TODO: remove once fixed upstream
if git diff --name-only --diff-filter=ACMR "origin/${{ github.event.pull_request.base.ref }}" | grep -qE '\.(scala|sbt|sc)$'; then
echo "changed=true" >> "$GITHUB_OUTPUT"
else
echo "changed=false" >> "$GITHUB_OUTPUT"
fi
- name: Run scalafix linting
if: steps.lintable-changes.outputs.changed == 'true'
run: sbt --server --batch "scalafix --diff-base origin/${{ github.event.pull_request.base.ref }} RestrictedImports SingleLetterIdentifiers UnorderedIteration"
- run: echo "Previous step failed because certain coding quality expectations were violated. Please check the logs."
if: ${{ failure() }}
test:
needs: [formatting, linting]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
- name: Set up JDK
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
java-version: 21
cache: sbt
- uses: sbt/setup-sbt@6158cb0903b8ceeae04f830055f3155e1b6a5ad7 # v1.5.11
- name: Install php
if: matrix.os == 'macos-latest'
run: brew install php
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
cache: false
go-version: 1.25
- name: Set up Swift (macos-latest)
if: matrix.os == 'macos-latest'
uses: SwiftyLab/setup-swift@9014d4136569075c696d4151c7810ecde8712907 # v1.14.1
# macos-latest runner switched to Xcode 26.4.1 as the new default
# Some swiftsrc2cpg tests use `import Foundation` which can not be
# compiled with an incompatible toolchain/SDK combination.
#
# error: failed to build module 'Darwin'; this SDK is not supported by the compiler
# (the SDK is built with 'Apple Swift version 6.3.2 (swiftlang-6.3.2.1.2 clang-2100.0.123.2)',
# while this compiler is 'Apple Swift version 6.1.3 (swift-6.1.3-RELEASE)').
# Please select a toolchain which matches the SDK.
#
# See: https://github.com/actions/runner-images/issues/14167
with:
swift-version: "6.3"
- name: Set up Swift
if: matrix.os != 'macos-latest'
uses: SwiftyLab/setup-swift@9014d4136569075c696d4151c7810ecde8712907 # v1.14.1
with:
swift-version: "6.1"
- name: Set up Rust
uses: dtolnay/rust-toolchain@02cb101ec7c40f2c49e1d9714d64511d8e1b74de # v1
with:
toolchain: stable
components: rust-src
- name: Run tests
run: sbt --server --batch "clean ; c2cpg/stage ; jssrc2cpg/stage ; javasrc2cpg/stage ; swiftsrc2cpg/stage ; testFull"
test-scripts:
needs: [formatting, linting]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
- name: Set up JDK
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
java-version: 21
cache: sbt
- uses: sbt/setup-sbt@6158cb0903b8ceeae04f830055f3155e1b6a5ad7 # v1.5.11
- name: Install coreutils
if: matrix.os == 'macos-latest'
run: brew install coreutils
- name: Install php
if: matrix.os == 'macos-latest'
run: brew install php
- name: Install Python dependencies for distribution test (Linux, MacOS)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: |
python -m pip install requests pexpect
- name: Install Python dependencies for distribution test (Windows)
if: matrix.os == 'windows-latest'
run: |
python -m pip install setuptools<81
python -m pip install requests wexpect
- name: Test distribution
run: |
sbt --server --batch "joerncli/stage ; querydb/createDistribution"
python -u ./testDistro.py