diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ccfb9ff..5923518 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/src/test/java/TestHello.java b/src/test/java/TestHello.java index 03b6426..785fcfa 100644 --- a/src/test/java/TestHello.java +++ b/src/test/java/TestHello.java @@ -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); } } \ No newline at end of file