Skip to content

Adds many using in tests #2420

Adds many using in tests

Adds many using in tests #2420

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build and test
# Controls when the action will run. Triggers the workflow on push
# events but only for the master branch
on:
push:
# only trigger on branches, not on tags
branches: '**'
paths-ignore:
- 'docs/**'
workflow_dispatch:
inputs:
EnableDebugLogging:
description: 'Enable debug logs in tests'
required: false
default: false
type: boolean
ExecuteOnMoreOSes:
description: 'Test on more OSes'
required: false
default: false
type: boolean
ExecuteOnLargerJDKSet:
description: 'Executes tests on more JDK'
required: false
default: true
type: boolean
EnableWindowsTests:
description: 'Executes tests on Windows'
required: false
default: false
type: boolean
EnableMacOSTests:
description: 'Executes tests on MacOS'
required: false
default: false
type: boolean
UseLastRepositoryBuild:
description: 'Use latest NuGet packages from JNet'
required: false
default: false
type: boolean
ForceContinueOnError:
description: 'Force continue-on-error'
required: false
default: false
type: boolean
UploadServerLogs:
description: 'Upload server logs'
required: false
default: false
type: boolean
EnableProcessDump:
description: 'Enable .NET process dump'
required: false
default: '0'
type: choice
options:
- "0"
- "1"
ProcessDumpType:
description: '.NET process dump type'
required: false
default: '3'
type: choice
options:
- "1"
- "2"
- "3"
- "4"
EnableVerboseDiagnosticProcessDump:
description: 'Enables verbose diagnostic logging of the dump process'
required: false
default: '0'
type: choice
options:
- "0"
- "1"
schedule:
- cron: "0 4 * * 6"
concurrency:
group: '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}'
cancel-in-progress: true
# This workflow contains two jobs called "check_changes", "build_windows"
jobs:
# Verify if a build is needed
check_changes:
name: Check changed files
outputs:
run_build: ${{ steps.check_files.outputs.run_build || steps.force_execute.outputs.run_build }}
runs-on: ubuntu-latest
steps:
- name: Force check on true
id: force_execute
if: ${{ github.event_name != 'push' }}
run: echo "run_build=true" >> $GITHUB_OUTPUT
- name: Create modified file list
if: ${{ github.event_name == 'push' }}
id: get_changed_files
uses: masesgroup/retrieve-changed-files@v4
with:
format: 'csv'
- name: Check modified file list
if: ${{ github.event_name == 'push' }}
id: check_files
run: |
mapfile -d ',' -t added_modified_files < <(printf '%s,' '${{ steps.get_changed_files.outputs.added_modified }}')
for added_modified_file in "${added_modified_files[@]}"; do
if [[ $added_modified_file == ".github/workflows/build.yaml"* ]]; then
echo "$added_modified_file is myself."
echo "run_build=true" >> $GITHUB_OUTPUT
break
fi
if [[ $added_modified_file == ".github/workflows/build_common.yaml"* ]]; then
echo "$added_modified_file is myself."
echo "run_build=true" >> $GITHUB_OUTPUT
break
fi
if [[ $added_modified_file == "src/container/"* ]]; then
echo "$added_modified_file file is under the directory 'src/'."
echo "run_build=true" >> $GITHUB_OUTPUT
break
fi
if [[ $added_modified_file == "src/jvm/"* ]]; then
echo "$added_modified_file file is under the directory 'src/'."
echo "run_build=true" >> $GITHUB_OUTPUT
break
fi
if [[ $added_modified_file == "src/net/"* ]]; then
echo "$added_modified_file file is under the directory 'src/'."
echo "run_build=true" >> $GITHUB_OUTPUT
break
fi
if [[ $added_modified_file == "tests/"* ]]; then
echo "$added_modified_file file is under the directory 'src/'."
echo "run_build=true" >> $GITHUB_OUTPUT
break
fi
done
- name: Get run_build
run: echo "The selected run_build is ${{ steps.check_files.outputs.run_build }}"
build:
needs: check_changes
if: "always() && needs.check_changes.outputs.run_build == 'true'"
permissions:
contents: read
pull-requests: write
attestations: write
packages: write
id-token: write
artifact-metadata: write
uses: ./.github/workflows/build_common.yaml
with:
ExecuteOnMoreOSes: ${{ inputs.ExecuteOnMoreOSes || github.event_name == 'schedule' }}
ExecuteOnLargerJDKSet: ${{ inputs.ExecuteOnLargerJDKSet || github.ref_name == 'master' || github.event_name == 'schedule' }}
EnableLinuxTests: true
EnableWindowsTests: ${{ inputs.EnableWindowsTests || github.ref_name == 'master' || github.event_name == 'schedule' }}
EnableMacOSTests: ${{ inputs.EnableMacOSTests || github.event_name == 'schedule' }}
UseLastRepositoryBuild: ${{ inputs.UseLastRepositoryBuild || false }}
ForceContinueOnError: ${{ inputs.ForceContinueOnError || false }}
UploadServerLogs: ${{ inputs.ForceContinueOnError || false }}
EnableProcessDump: ${{ inputs.EnableProcessDump || '0' }}
ProcessDumpType: ${{ inputs.ProcessDumpType || '3' }}
EnableVerboseDiagnosticProcessDump: ${{ inputs.EnableVerboseDiagnosticProcessDump || '0' }}
secrets:
actor: ${{ github.actor }}
GITHUB_TOKEN_INHERITED: ${{ secrets.GITHUB_TOKEN }}
JCOBRIDGE_ENCODED: ${{ secrets.JCOBRIDGE_ENCODED_2_6_9 }}