Skip to content

Commit ead3fcb

Browse files
committed
Add CodeQL and Gradle actions
1 parent 99b9895 commit ead3fcb

File tree

2 files changed

+91
-0
lines changed

2 files changed

+91
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ master, version/**/* ]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [ master, version/**/* ]
9+
schedule:
10+
- cron: '45 0 * * 5'
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [ 'java' ]
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v2
29+
- name: Set up JDK
30+
uses: actions/setup-java@v2
31+
with:
32+
java-version: 17
33+
cache: 'gradle'
34+
distribution: 'temurin'
35+
36+
# Initializes the CodeQL tools for scanning.
37+
- name: Initialize CodeQL
38+
uses: github/codeql-action/init@v1
39+
with:
40+
languages: ${{ matrix.language }}
41+
# If you wish to specify custom queries, you can do so here or in a config file.
42+
# By default, queries listed here will override any specified in a config file.
43+
# Prefix the list here with "+" to use these queries and those in the config file.
44+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
45+
46+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
47+
# If this step fails, then you should remove it and run the build manually (see below)
48+
- name: Autobuild
49+
uses: github/codeql-action/autobuild@v1
50+
51+
# ℹ️ Command-line programs to run using the OS shell.
52+
# 📚 https://git.io/JvXDl
53+
54+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
55+
# and modify them (or add more) to build your code if your project
56+
# uses a compiled language
57+
58+
#- run: |
59+
# make bootstrap
60+
# make release
61+
62+
- name: Perform CodeQL Analysis
63+
uses: github/codeql-action/analyze@v1

.github/workflows/gradle.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Gradle Build
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
name: Build WorldEdit on ${{ matrix.os }}
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
os: [ubuntu-latest, windows-latest]
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up JDK
16+
uses: actions/setup-java@v2
17+
with:
18+
java-version: 17
19+
cache: 'gradle'
20+
distribution: 'temurin'
21+
- name: Build with Gradle
22+
run: ./gradlew build -s
23+
- uses: actions/upload-artifact@v2.2.4
24+
name: Archive Reports
25+
if: always()
26+
with:
27+
name: reports for ${{ matrix.os }}
28+
path: '**/build/reports/**'

0 commit comments

Comments
 (0)