2020-11-20 06:54:28 +07:00
|
|
|
name: Tests
|
2020-11-20 06:53:02 +07:00
|
|
|
|
2020-11-26 04:09:17 +07:00
|
|
|
on: [push, workflow_dispatch]
|
2020-11-20 06:53:02 +07:00
|
|
|
|
|
|
|
jobs:
|
2021-06-14 22:05:37 +07:00
|
|
|
runPush:
|
2020-11-20 06:53:02 +07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2020-11-20 07:27:21 +07:00
|
|
|
- uses: actions/checkout@v2
|
2020-11-20 06:53:02 +07:00
|
|
|
- name: Trigger BE build
|
2020-11-25 23:56:10 +07:00
|
|
|
if: ${{ github.repository == 'Anuken/Mindustry' }}
|
2020-11-20 06:53:02 +07:00
|
|
|
run: |
|
|
|
|
git clone --depth=1 --branch=master https://github.com/Anuken/MindustryBuilds ../MindustryBuilds
|
|
|
|
cd ../MindustryBuilds
|
2020-11-20 23:26:49 +07:00
|
|
|
BNUM=$(($GITHUB_RUN_NUMBER + 20000))
|
|
|
|
git tag ${BNUM}
|
2020-11-20 06:53:02 +07:00
|
|
|
git config --global user.name "Build Uploader"
|
2020-11-20 23:26:49 +07:00
|
|
|
git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/Anuken/MindustryBuilds ${BNUM}
|
2021-09-23 05:01:04 +07:00
|
|
|
- name: Set up JDK 17
|
2021-06-03 20:52:45 +07:00
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
2021-09-23 05:01:04 +07:00
|
|
|
java-version: 17
|
2021-06-03 20:52:45 +07:00
|
|
|
- name: Run unit tests
|
2021-09-23 05:17:54 +07:00
|
|
|
run: ./gradlew clean cleanTest test --stacktrace
|