-
-
Notifications
You must be signed in to change notification settings - Fork 691
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only run applicable GHA workflows on PRs (#2697)
- Loading branch information
1 parent
a2b3115
commit cde57b5
Showing
5 changed files
with
76 additions
and
83 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Java | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "**/*.java" | ||
- "**/*.gradle" | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Check if tests compile cleanly with starter sources | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
- name: Set up JDK 1.17 | ||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 | ||
with: | ||
java-version: 17 | ||
distribution: "temurin" | ||
- name: Check if tests compile cleanly with starter sources | ||
run: ./gradlew compileStarterTestJava --continue | ||
working-directory: exercises | ||
|
||
lint: | ||
name: Lint Java files using Checkstyle | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
- name: Set up JDK 1.17 | ||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 | ||
with: | ||
java-version: 17 | ||
distribution: "temurin" | ||
- name: Run checkstyle | ||
run: ./gradlew check --exclude-task test --continue | ||
working-directory: exercises | ||
|
||
test: | ||
name: Test all exercises using java-test-runner | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
- name: Test all exercises using java-test-runner | ||
run: bin/test-with-test-runner | ||
- name: Archive test results | ||
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 | ||
with: | ||
name: test-results | ||
path: exercises/**/build/results.json | ||
if: failure() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Markdown | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "**/*.md" | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
name: Lint Markdown files | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
- name: Lint markdown | ||
uses: DavidAnson/markdownlint-cli2-action@510b996878fc0d1a46c8a04ec86b06dbfba09de7 |
This file was deleted.
Oops, something went wrong.