Skip to content

cr comment

cr comment #46

Workflow file for this run

name: Tests
on:
push:
# Triggers the workflow on labeled PRs only.
pull_request_target:
types: [labeled]
# Ensures that only the latest commit is running for each PR at a time.
# Ignores this rule for push events.
concurrency:
group: ${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
Artifactory-Jenkins-Plugin-Tests:
if: (contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push') && github.repository_owner != 'jenkinsci'
name: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2019]
runs-on: ${{ matrix.os }}
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.20.x
- name: Install npm
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Install Java
uses: actions/setup-java@v3
with:
java-version: "8"
distribution: "temurin"
- name: Install NuGet
uses: nuget/setup-nuget@v1
with:
nuget-version: 6.x
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Setup Python virtual environment
run: python -m pip install virtualenv && python -m virtualenv venv
- name: Activate Python virtual env on Windows
if: ${{ runner.os == 'Windows' }}
run: . venv\Scripts\activate.ps1
- name: Activate Python virtual env on Posix
if: ${{ runner.os == 'macOS' || runner.os == 'Linux' }}
run: source venv/bin/activate
- name: Install Conan
run: pip install "conan<2" -q
- name: Configure Linux runner
if: ${{ runner.os == 'Linux' }}
run: echo "MAVEN_HOME=$(whereis mvn)" >> $GITHUB_ENV
- name: Configure Windows runner
if: ${{ runner.os == 'Windows' }}
run: echo "MAVEN_HOME=$(which.exe mvn)" >> $GITHUB_ENV
- name: Configure MacOS runner
if: ${{ runner.os == 'macOS' }}
run: |
echo "JENKINS_DOCKER_TEST_DISABLE=true" >> $GITHUB_ENV
echo "MAVEN_HOME=$(which mvn)" >> $GITHUB_ENV
echo "GRADLE_HOME=$(brew info gradle | grep /usr/local/Cellar/gradle | awk '{print $1}')" >> $GITHUB_ENV
- name: Run tests
env:
JENKINS_PLATFORM_URL: ${{ secrets.PLATFORM_URL }}
JENKINS_PLATFORM_USERNAME: ${{ secrets.PLATFORM_USER }}
JENKINS_PLATFORM_ADMIN_TOKEN: ${{ secrets.PLATFORM_ADMIN_TOKEN }}
JENKINS_ARTIFACTORY_DOCKER_PULL_DOMAIN: ${{ secrets.CONTAINER_REGISTRY }}/docker-remote
JENKINS_ARTIFACTORY_DOCKER_PUSH_DOMAIN: ${{ secrets.CONTAINER_REGISTRY }}/docker-local
JENKINS_ARTIFACTORY_DOCKER_PULL_REPO: docker-remote
JENKINS_ARTIFACTORY_DOCKER_PUSH_REPO: docker-local
run: mvn -V -B -U --no-transfer-progress clean verify -DskipITs=false "-Dfindbugs.failOnError=false"