Skip to content
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

init reformat code #594

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
74 changes: 37 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,40 +19,40 @@ jobs:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Create multimedia dir
run: sudo mkdir -p /opt/multimedia/patient_images && id

- name: Grant read and write permissions to multimedia directory
run: sudo chmod a+rwx /opt/multimedia/patient_images
- name: Run Unit tests with Maven
run: mvn -B clean test jacoco:report --file pom.xml --no-transfer-progress
- name: Set Branch name Environment variable
env:
BRANCH_NAME_OR_REF: ${{ github.head_ref || github.ref }}
run: echo "BRANCH_NAME=${BRANCH_NAME_OR_REF#refs/heads/}" >> $GITHUB_ENV
- name: Set PR Number Environment variable
run: |
echo "PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")" >> $GITHUB_ENV

- name: Upload coveralls report
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
run: |
mvn -B coveralls:report --file pom.xml \
--no-transfer-progress \
-D repoToken="$COVERALLS_REPO_TOKEN" \
-D serviceName=Github \
-D branch="$BRANCH_NAME" \
-D pullRequest="$PR_NUMBER" \
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Create multimedia dir
run: sudo mkdir -p /opt/multimedia/patient_images && id

- name: Grant read and write permissions to multimedia directory
run: sudo chmod a+rwx /opt/multimedia/patient_images

- name: Run Unit tests with Maven
run: mvn -B clean test jacoco:report --file pom.xml --no-transfer-progress

- name: Set Branch name Environment variable
env:
BRANCH_NAME_OR_REF: ${{ github.head_ref || github.ref }}
run: echo "BRANCH_NAME=${BRANCH_NAME_OR_REF#refs/heads/}" >> $GITHUB_ENV

- name: Set PR Number Environment variable
run: |
echo "PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")" >> $GITHUB_ENV

- name: Upload coveralls report
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
run: |
mvn -B coveralls:report --file pom.xml \
--no-transfer-progress \
-D repoToken="$COVERALLS_REPO_TOKEN" \
-D serviceName=Github \
-D branch="$BRANCH_NAME" \
-D pullRequest="$PR_NUMBER" \
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
tags:
- v[0-9]+.[0-9]+.[0-9]+-SNAPSHOT
- v[0-9]+.[0-9]+.[0-9]+-[0-9a-zA-Z]+-SNAPSHOT
- v[0-9]+.[0-9]+.[0-9]+-[0-9a-zA-Z]+-[0-9a-zA-Z]+-SNAPSHOT
- v[0-9]+.[0-9]+.[0-9]+-[0-9a-zA-Z]+-[0-9a-zA-Z]+-SNAPSHOT

jobs:
release:
Expand All @@ -17,11 +17,11 @@ jobs:
- name: Cancel previous workflow runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
access_token: ${{ github.token }}

- uses: actions/checkout@v2
with:
submodules: recursive
submodules: recursive

- name: Set up JDK 11
uses: actions/setup-java@v1
Expand All @@ -34,7 +34,7 @@ jobs:
SETTINGS_FILE: ${{ secrets.SETTINGS_XML }}

- name: Generate & upload library snapshot artifact JAR (Java Archive) file
run: mvn clean deploy -Dmaven.test.skip=true --no-transfer-progress
run: mvn clean deploy -Dmaven.test.skip=true --no-transfer-progress

- name: Github Release
uses: softprops/action-gh-release@v1
Expand Down
39 changes: 21 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,35 @@ Postgres, couchdb, lucene and scheduler domain objects, repositories and service

## Relevant Wiki Pages

* OpenSRP Server Refactor and Cleanup
* [Refactor and Cleanup](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/562659330/OpenSRP+Server+Refactor+and+Clean+up)
* [How to upload and use maven jar artifacts](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/564428801/How+to+upload+and+use+maven+jar+artifacts)
* [Managing Server Wide Properties](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/602570753/Managing+Server+Wide+Properties)
* [Server Web Build](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/616595457/Server+Web+Build)
* [OpenSRP Server Build](https://smartregister.atlassian.net/wiki/display/Documentation/OpenSRP+Server+Build)
* Deployment
* [Docker Setup](https://smartregister.atlassian.net/wiki/display/Documentation/Docker+Setup)
* [Docker Compose Setup](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/52690976/Docker+Compose+Setup)
* [Ansible Playbooks](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/540901377/Ansible+Playbooks)
* [Postgres Database Support](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/251068417/Postgres+Database+Support+as+Main+Datastore)
* [OpenSRP Load Testing](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/268075009/OpenSRP+Load+Testing)
* OpenSRP Server Refactor and Cleanup
* [Refactor and Cleanup](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/562659330/OpenSRP+Server+Refactor+and+Clean+up)
* [How to upload and use maven jar artifacts](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/564428801/How+to+upload+and+use+maven+jar+artifacts)
* [Managing Server Wide Properties](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/602570753/Managing+Server+Wide+Properties)
* [Server Web Build](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/616595457/Server+Web+Build)
* [OpenSRP Server Build](https://smartregister.atlassian.net/wiki/display/Documentation/OpenSRP+Server+Build)
* Deployment
* [Docker Setup](https://smartregister.atlassian.net/wiki/display/Documentation/Docker+Setup)
* [Docker Compose Setup](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/52690976/Docker+Compose+Setup)
* [Ansible Playbooks](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/540901377/Ansible+Playbooks)
* [Postgres Database Support](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/251068417/Postgres+Database+Support+as+Main+Datastore)
* [OpenSRP Load Testing](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/268075009/OpenSRP+Load+Testing)

## Running Integration Tests

We use [test-containers](https://github.com/testcontainers/testcontainers-java) to create ephemeral instances of the postgres database and rabbitmq server for the integration tests. This means that one does not have to set up any instance to run the integration tests on one's machine.
We use [test-containers](https://github.com/testcontainers/testcontainers-java) to create ephemeral instances of the
postgres database and rabbitmq server for the integration tests. This means that one does not have to set up any
instance to run the integration tests on one's machine.

### How it works

When an integration test is run/executed:

* Test-Containers will pull a docker image and/or start a docker container needed.
* Test-Containers will then provide a dynamic port to connect to, from the hosts network.
* A single instance is created for all the tests.
* The docker container will be killed once all the tests have been executed.
* Test-Containers will pull a docker image and/or start a docker container needed.
* Test-Containers will then provide a dynamic port to connect to, from the hosts network.
* A single instance is created for all the tests.
* The docker container will be killed once all the tests have been executed.

## Publishing artifacts

For more on publishing this artifact see [Publishing via Tag](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/3013902337/How+to+set+up+Server+Library+artifact+CI+CD+on+Github#Publishing-via-TAG)
For more on publishing this artifact
see [Publishing via Tag](https://smartregister.atlassian.net/wiki/spaces/Documentation/pages/3013902337/How+to+set+up+Server+Library+artifact+CI+CD+on+Github#Publishing-via-TAG)
Loading