Skip to content

Commit 8e51a2c

Browse files
authored
CI Workflow, Update .gitignore, Fix gradlew Permissions from jackh54/master
2 parents eb839a9 + be7e4ac commit 8e51a2c

3 files changed

Lines changed: 69 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up JDK 21
21+
uses: actions/setup-java@v4
22+
with:
23+
java-version: '21'
24+
distribution: 'temurin'
25+
26+
- name: Setup Gradle
27+
uses: gradle/gradle-build-action@v2
28+
with:
29+
gradle-version: wrapper
30+
31+
- name: Build with Gradle
32+
run: ./gradlew build
33+
34+
- name: Run tests
35+
run: ./gradlew test
36+
37+
- name: Generate Javadoc
38+
run: ./gradlew javadoc
39+
40+
- name: Upload main artifact
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: pmweatherapi
44+
path: build/libs/*[!-javadoc][!-sources].jar
45+
46+
- name: Upload sources
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: pmweatherapi-sources
50+
path: build/libs/*-sources.jar
51+
52+
- name: Upload Javadoc
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: pmweatherapi-javadoc
56+
path: build/libs/*-javadoc.jar
57+
58+
- name: Upload test results
59+
if: always()
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: test-results
63+
path: |
64+
build/reports/tests/
65+
build/test-results/

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
# IntelliJ
99
out/
10+
# vscode
11+
.vscode/
12+
1013
# mpeltonen/sbt-idea plugin
1114
.idea_modules/
1215

@@ -102,6 +105,7 @@ $RECYCLE.BIN/
102105

103106
.gradle
104107
build/
108+
bin/
105109

106110
# Ignore Gradle GUI config
107111
gradle-app.setting

gradlew

100644100755
File mode changed.

0 commit comments

Comments
 (0)