Skip to content

Update all non-major dependencies #321

Update all non-major dependencies

Update all non-major dependencies #321

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Test
on:
workflow_dispatch:
# push:
# branches:
# - develop
pull_request_target:
paths-ignore:
- 'README.md'
jobs:
approve-workflow:
if: github.actor == 'renovate[bot]' || github.actor == 'GeneralTao2'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get environment id
uses: actions/github-script@v7
id: environment-id
with:
script: |
const environmentResponse = await github.rest.repos.getEnvironment({
owner: context.repo.owner,
repo: context.repo.repo,
environment_name: 'E2E'
});
const environmentId = environmentResponse.data.id;
console.log("Env:", environmentId);
return environmentId;
- name: Approve workflow
uses: actions/github-script@v7
env:
GH_TOKEN: ${{ github.token }}
with:
github-token: ${{ secrets.APPROVE_WORKFLOW_GITHUB_TOKEN }}
script: |
await github.rest.actions.reviewPendingDeploymentsForRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.runId,
environment_ids: [${{ steps.environment-id.outputs.result }}],
state: 'approved',
comment: 'Ship it!',
});
test:
strategy:
max-parallel: 1
concurrency:
group: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
environment: E2E
steps:
- uses: ahmadnassri/action-workflow-queue@v1
with:
delay: 60000
timeout: 1000000
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B -P docker clean package -DskipTests
- name: Prepare for tests with Maven
run: mvn -B -P automation clean package "-Ddiscord.token=${{ secrets.JDHB_AUTOMATION_TEST_TOKEN }}" -DskipTests=true
- name: Run tests with Maven
run: |
mvn -Dtest=automation.runners.CucumberRunnerIT test