-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3e9aa4
commit da9f595
Showing
4 changed files
with
130 additions
and
29 deletions.
There are no files selected for viewing
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
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,86 @@ | ||
name: Test Maven Repo | ||
|
||
on: | ||
|
||
workflow_call: | ||
inputs: | ||
clojureRepo: | ||
description: "Repository name with owner." | ||
type: string | ||
required: true | ||
clojureRef: | ||
description: "The branch, tag or SHA to checkout" | ||
type: string | ||
required: true | ||
subjectRepo: | ||
description: "Subject Repository name with owner." | ||
type: string | ||
required: true | ||
subjectRef: | ||
description: "The branch, tag or SHA to checkout for subject repo" | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
java-version: ["8", "11", "17", "21"] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: ${{ matrix.java-version }} | ||
|
||
- name: Checkout Clojure Source Code | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ inputs.clojureRepo }} | ||
ref: ${{ inputs.clojureRef }} | ||
path: 'clojure-source' | ||
|
||
- name: Build Clojure from Source | ||
run: | | ||
cd clojure-source | ||
mvn install -Dmaven.test.skip=true | ||
- name: Checkout Regression Test Source Code | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: clojure/test.regression | ||
ref: 'main' | ||
path: 'test-source' | ||
|
||
- name: Determine latest snapshot version | ||
run: | | ||
chmod +x ./test-source/scripts/find-installed-clojure-version.sh | ||
./test-source/scripts/find-installed-clojure-version.sh | ||
- name: Checkout Subject Source Code | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ inputs.subjectRepo }} | ||
ref: ${{ inputs.subjectRef }} | ||
path: 'subject-source' | ||
|
||
- name: Install Leiningen | ||
run: | | ||
wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein | ||
chmod +x lein | ||
sudo mv lein /usr/local/bin/ | ||
- name: Install dependencies | ||
run: lein deps | ||
|
||
- name: Update project.clj with clojure build | ||
run: | | ||
cd /home/runner/work/test.regression/test.regression/subject-source | ||
sed -i.bak "s/\(org.clojure\/clojure\ \"[0-9\.]*\"\)/org.clojure\/clojure \"${{ env.LATEST_CLJ_BUILD }}\"/g" project.clj | ||
- name: Run Tests | ||
run: | | ||
lein test |
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
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,7 @@ | ||
#!/bin/bash | ||
|
||
# define the new version you want to use | ||
new_version=1.12.0-master-SNAPSHOT | ||
|
||
# use sed to replace the version inline | ||
sed -i.bak "s/\(org.clojure\/clojure\ \"[0-9\.]*\"\)/org.clojure\/clojure \"$new_version\"/g" project.clj |