actions: More GitHub actions (#1636)

* actions: Run in parallel

* actions: NPC stats scraper

* actions: Rename actions

* actions: Auto approve NPC stats updates

* gradle: Add tasks for different wiki scrape actions

* actions: Add item stats scraper

* actions: run scraper on a schedule (twice a week)

* actions: gradle wrapper updater
This commit is contained in:
Owain van Brakel
2019-09-22 22:33:25 +02:00
committed by Ganom
parent f7cb809cd9
commit ec3b99f0a7
13 changed files with 212 additions and 29 deletions

14
.github/workflows/auto-approve.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
name: RunelitePlus - Auto approve
on: pull_request
jobs:
approve:
runs-on: ubuntu-latest
steps:
- uses: hmarr/auto-approve-action@v2.0.0
if: github.actor == 'github-actions[bot]'
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

View File

@@ -1,4 +1,4 @@
name: RunelitePlus continuous integration
name: RunelitePlus - CI
on: [pull_request, push]
@@ -16,8 +16,4 @@ jobs:
- name: Assembling
run: gradlew assemble --console=plain
- name: Building
run: gradlew build --stacktrace -x test -x checkstyleMain --console=plain
- name: Testing
run: gradlew test --stacktrace --console=plain
- name: Checking code conventions
run: gradlew checkstyleMain --console=plain
run: gradlew build --stacktrace -x test -x checkstyleMain --console=plain

19
.github/workflows/checkstyle.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: RunelitePlus - Code convention
on: [pull_request, push]
jobs:
checkstyle:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Assembling
run: gradlew assemble --console=plain
- name: Checking code conventions
run: gradlew checkstyleMain --console=plain

17
.github/workflows/schedule.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: RunelitePlus - Gradle Wrapper
on:
schedule:
- cron: 0 0 * * *
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Update Gradle Wrapper
uses: rahulsom/gradle-up@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

47
.github/workflows/scraper.yml vendored Normal file
View File

@@ -0,0 +1,47 @@
name: RunelitePlus - Scraper
on:
schedule:
- cron: "0 0 * * 2,5"
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Assembling cache client
run: ./gradlew :cache-client:assemble --console=plain
- name: Assembling scraper
run: ./gradlew :wiki-scraper:assemble --console=plain
- name: Building cache client
run: ./gradlew :cache-client:build --console=plain
- name: Building scraper
run: ./gradlew :wiki-scraper:build --console=plain
- name: Downloading jagex cache
run: ./gradlew :cache-client:update --console=plain
- name: Scraping NPC stats
run: ./gradlew :wiki-scraper:npcStatsScrape --console=plain
- name: Create NPC stats Pull Request
uses: peter-evans/create-pull-request@v1.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULL_REQUEST_BRANCH: NPC-UPDATE
PULL_REQUEST_TITLE: 'Client: Update NPC stats'
PULL_REQUEST_BODY: This is an auto-generated PR with changes from the OSRS wiki
COMMIT_MESSAGE: 'Client: Update NPC stats'
- name: Scraping item stats
run: ./gradlew :wiki-scraper:npcStatsScrape --console=plain
- name: Create item stats Pull Request
uses: peter-evans/create-pull-request@v1.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULL_REQUEST_BRANCH: ITEM-STATS-UPDATE
PULL_REQUEST_TITLE: 'Client: Update item stats'
PULL_REQUEST_BODY: This is an auto-generated PR with changes from the OSRS wiki
COMMIT_MESSAGE: 'Client: Update item stats'

19
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: RunelitePlus - Testing
on: [pull_request, push]
jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Assembling
run: gradlew assemble --console=plain
- name: Testing
run: gradlew test --stacktrace --console=plain