Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 23 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,31 @@
name: "dropwizard-ci-pipeline"
name: continuous integration example

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-and-test:
runs-on: self-hosted
steps:
- uses: actions/checkout@v1

- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 11

- name: Build
working-directory: .
run: ./gradlew build -x test

- name: Test
working-directory: .
run: ./gradlew test
system-test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- name: Run docker Compose
working-directory:
run: docker-compose up -d --build
- name : set up python
uses: actions/setup-python@v1
with:
python-version: '3.7'
- run: pip install pytest requests
- name: Run system tests
working-directory:
run: pytest
- name: Bring server down
working-directory:
run: docker-compose down






build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Install Java
uses: actions/setup-java@v1
with:
java-version: 11

- name: Build with Gradle
working-directoy: ./
run: |
chmod +x gradlew
./gradlew build -x test

- name: Run tests
working-directoy: ./
run: ./gradlew test

4 changes: 2 additions & 2 deletions src/test/java/TestHello.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ public class TestHello {

@Test
public void testFoo() {
int result = 5 + 5 * 2;
assertEquals(result, 15);
int result = 10 + 2 * 2;
assertEquals(result, 14);
}

}