Skip to content

Commit

Permalink
Update GitHub workflows
Browse files Browse the repository at this point in the history
- Use latest actions version
- Run test matrix against Java 17 and 21 as well
  • Loading branch information
marcobiscaro2112 committed Aug 27, 2024
1 parent f9e99b9 commit 7e42a13
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 59 deletions.
43 changes: 13 additions & 30 deletions .github/workflows/clojure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,19 @@ on:
branches: [ master ]

jobs:
test-using-java-8:
name: 'Test using Java 8'
test-using-java:
strategy:
matrix:
java-version: [ '8', '11', '17', '21' ]
name: Test using Java ${{ matrix.java-version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-java@v1
- uses: actions/setup-java@v4
with:
java-version: 8

- name: Print java version
run: java -version

- name: Install dependencies
run: lein deps

- name: Run clj tests
run: lein test

- name: Run midje tests
run: lein midje

test-using-java-11:
name: 'Test using Java 11'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-java@v1
with:
java-version: 11
distribution: 'temurin'
java-version: ${{ matrix.java-version }}

- name: Print java version
run: java -version
Expand All @@ -55,11 +37,12 @@ jobs:
name: 'Lint'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-java@v1
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
java-version: 21

- name: Lint check
run: lein lint
40 changes: 11 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,19 @@ on:
- '*'

jobs:
test-using-java-8:
name: 'Test using Java 8'
test-using-java:
strategy:
matrix:
java-version: [ '8', '11', '17', '21' ]
name: Test using Java ${{ matrix.java-version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-java@v1
- uses: actions/setup-java@v4
with:
java-version: 8

- name: Print java version
run: java -version

- name: Install dependencies
run: lein deps

- name: Run clj tests
run: lein test

- name: Run midje tests
run: lein midje

test-using-java-11:
name: 'Test using Java 11'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-java@v1
with:
java-version: 11
distribution: 'temurin'
java-version: ${{ matrix.java-version }}

- name: Print java version
run: java -version
Expand All @@ -53,9 +35,9 @@ jobs:
release:
name: 'Publish on Clojars'
runs-on: ubuntu-latest
needs: [test-using-java-11, test-using-java-8]
needs: test-using-java
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install dependencies
run: lein deps
Expand Down

0 comments on commit 7e42a13

Please sign in to comment.