-
Notifications
You must be signed in to change notification settings - Fork 91
STAND-128: Add GitHub Actions workflow to build and test in Standalone 2.x Reff App #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1e7c04f
aada455
5e71d41
b38a832
e7c0dde
2680f50
d5eed7c
b9254c8
c137e4f
71ff789
0e5b99e
c9841ef
e507223
0bd880c
85e18c6
4eb6221
3853adc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.2.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
| <profiles> | ||
| <profile> | ||
| <repositories> | ||
| <repository> | ||
| <id>openmrs-repo</id> | ||
| <name>OpenMRS Repository</name> | ||
| <url>https://mavenrepo.openmrs.org/public</url> | ||
| </repository> | ||
| <repository> | ||
| <releases> | ||
| <checksumPolicy>warn</checksumPolicy> | ||
| </releases> | ||
| <snapshots> | ||
| <checksumPolicy>warn</checksumPolicy> | ||
| </snapshots> | ||
| <id>archetype</id> | ||
| <url>https://mavenrepo.openmrs.org/public</url> | ||
| </repository> | ||
| <repository> | ||
| <id>openmrs-repo-thirdparty</id> | ||
| <name>OpenMRS Thirdparty Nexus Repository</name> | ||
| <url>https://mavenrepo.openmrs.org/thirdparty</url> | ||
| </repository> | ||
| <repository> | ||
| <id>mks-nexus-public</id> | ||
| <name>Mekom Repository</name> | ||
| <url>https://nexus.mekomsolutions.net/repository/maven-public</url> | ||
| </repository> | ||
| </repositories> | ||
| <pluginRepositories> | ||
| <pluginRepository> | ||
| <snapshots> | ||
| <enabled>false</enabled> | ||
| </snapshots> | ||
| <id>openmrs-repo</id> | ||
| <name>OpenMRS Nexus Repository</name> | ||
| <url>https://mavenrepo.openmrs.org/public</url> | ||
| </pluginRepository> | ||
| </pluginRepositories> | ||
| <id>openmrs</id> | ||
| </profile> | ||
| </profiles> | ||
| <activeProfiles> | ||
| <activeProfile>openmrs</activeProfile> | ||
| </activeProfiles> | ||
| <pluginGroups> | ||
| <pluginGroup>org.openmrs.maven.plugins</pluginGroup> | ||
| </pluginGroups> | ||
| </settings> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| name: Standalone 2.x Test CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [openmrs-emr2] | ||
| pull_request: | ||
| branches: [openmrs-emr2] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build-linux: | ||
| name: on Linux (Java 21) | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Checkout openmrs-core | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: openmrs/openmrs-core | ||
| ref: 2.8.x | ||
| path: openmrs-core | ||
|
|
||
| - name: Set up JDK 21 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '21' | ||
| distribution: 'temurin' | ||
|
|
||
| - name: Build and install openmrs-core | ||
| run: | | ||
| cd openmrs-core | ||
| mvn clean install -DskipTests | ||
| - name: Run Maven Clean | ||
| run: mvn clean --settings .github/maven-settings.xml | ||
|
|
||
| - name: Run Maven Install | ||
| run: mvn install --settings .github/maven-settings.xml | ||
|
|
||
| build-windows: | ||
| name: on Windows (Java 21) | ||
| runs-on: windows-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Checkout openmrs-core | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: openmrs/openmrs-core | ||
| ref: 2.8.x | ||
| path: openmrs-core | ||
|
|
||
| - name: Set up JDK 21 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '21' | ||
| distribution: 'temurin' | ||
|
|
||
| - name: Build and install openmrs-core | ||
| run: | | ||
| cd openmrs-core | ||
| mvn clean install -DskipTests | ||
| - name: Run Maven Clean | ||
| run: mvn clean --settings .github/maven-settings.xml | ||
|
|
||
| - name: Run Maven Install | ||
| run: mvn install --settings .github/maven-settings.xml | ||
|
|
||
| build-macos: | ||
| name: on macOS (Java 21) | ||
| runs-on: macos-15 | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Checkout openmrs-core | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: openmrs/openmrs-core | ||
| ref: 2.8.x | ||
| path: openmrs-core | ||
|
|
||
| - name: Set up JDK 21 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '21' | ||
| distribution: 'temurin' | ||
|
|
||
| - name: Build and install openmrs-core | ||
| run: | | ||
| cd openmrs-core | ||
| mvn clean install -DskipTests | ||
| - name: Run Maven Clean | ||
| run: mvn clean --settings .github/maven-settings.xml | ||
|
|
||
| - name: Run Maven Install | ||
| run: mvn install --settings .github/maven-settings.xml | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -186,13 +186,14 @@ | |
| <executions> | ||
| <execution> | ||
| <id>package-jar-with-dependencies</id> | ||
| <phase>prepare-package</phase> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why change the phase?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This helps the attaching not to temporarily treat it as a temporary build output |
||
| <phase>package</phase> | ||
| <goals> | ||
| <goal>single</goal> | ||
| </goals> | ||
| <configuration> | ||
| <finalName>openmrs-standalone</finalName> | ||
| <appendAssemblyId>false</appendAssemblyId> | ||
| <attach>true</attach> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are we attaching?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Previously i was facing Without attaching, Maven treats the assembly as a temporary build output, not an artifact, which breaks the build since it does not include |
||
| <outputDirectory>${project.build.directory}</outputDirectory> | ||
| <descriptorRefs> | ||
| <descriptorRef>jar-with-dependencies</descriptorRef> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this since for 2.8.x+ Snapshot artifacts are not published and cannot be pulled and built on CI this is a twist which later
builds the repo like locally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when we remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It results into
But only on CI and passes locally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will happen when we need to use the 3.0.x branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically tried the master branch but as we talk now it points 3.0.0 version ... by using this am hoping for future develops this will require manual overide to point to the branch its building towards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you include that in the documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yes let me add it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkayiwa Have updated it