mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-01 00:10:12 +01:00
4196141db1
* Gradle 7.4.2 * Build changes for MC 1.19 - Updated loom to minor version 0.12 & moved to root project - Updated mappings, command API, fabric API & loader version - Moved Selenium to common module because of a conflict with loom's dependency resolution * Add remap folder to .gitignore * Fix version token replacement * Update to Minecraft 1.19 * Don't forget the pipelines Affects issues: - Fixed #2417
69 lines
2.1 KiB
YAML
69 lines
2.1 KiB
YAML
|
|
name: Java PR CI
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
mariadb:
|
|
image: mariadb:latest
|
|
ports:
|
|
- 3306
|
|
env:
|
|
MYSQL_USER: user
|
|
MYSQL_PASSWORD: password
|
|
MYSQL_DATABASE: test
|
|
MYSQL_ROOT_PASSWORD: password
|
|
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up JDK 1.16
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: 'adopt'
|
|
java-version: '17'
|
|
- name: Setup Selenium Webdriver
|
|
uses: nanasess/setup-chromedriver@v1
|
|
- name: Setup Selenium Webdriver settings
|
|
run: |
|
|
export DISPLAY=:99
|
|
chromedriver --url-base=/wd/hub &
|
|
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
|
|
- name: Verify MariaDB connection
|
|
env:
|
|
PORT: ${{ job.services.mariadb.ports[3306] }}
|
|
run: |
|
|
while ! mysqladmin ping -h"127.0.0.1" -P"$PORT" --silent; do
|
|
sleep 1
|
|
done
|
|
- name: Cache Gradle packages
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
- name: Build with Gradle
|
|
env:
|
|
MYSQL_DB: test
|
|
MYSQL_USER: user
|
|
MYSQL_PASS: password
|
|
MYSQL_PORT: ${{ job.services.mariadb.ports[3306] }}
|
|
CHROMEDRIVER: /usr/local/bin/chromedriver
|
|
run: |
|
|
cd Plan
|
|
./gradlew build
|
|
- name: Cleanup Gradle cache
|
|
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
|
|
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
|
|
run: |
|
|
rm -f ~/.gradle/caches/modules-2/modules-2.lock
|
|
rm -f ~/.gradle/caches/modules-2/gc.properties
|