diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5451483..a84aa1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: pass-docker-services Continuous Integration +name: pass-policy-service Continuous Integration on: [ pull_request, workflow_dispatch ] concurrency: @@ -12,10 +12,42 @@ jobs: - run: echo "This is a CI build of branch ${{ github.ref }} in repository ${{ github.repository }}" - run: echo "This job was triggered by a ${{ github.event_name }} event and is running on a ${{ runner.os }} server" - call-tests-unit: - name: Run Unit Tests - uses: eclipse-pass/pass-policy-service/.github/workflows/tests-unit.yml@main + run-unit-tests: + name: "Run Unit Tests" + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v2 + + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: '>=1.17.0' + + - name: Run Unit Tests + run: go test ./... - call-tests-integration: - name: Run Integration Tests - uses: eclipse-pass/pass-policy-service/.github/workflows/tests-integration.yml@main + run-integration-tests: + name: "Run Integration Tests" + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v2 + + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: '>=1.17.0' + + - name: Docker pull + run: docker-compose pull + + - name: Start containers + run: docker-compose up -d + + - name: Run Integration Tests + run: go test -tags=integration ./... + + - name: Stop containers + if: always() + run: docker-compose -f "docker-compose.yml" down diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml deleted file mode 100644 index 152f568..0000000 --- a/.github/workflows/tests-integration.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Run Integration Tests -on: - workflow_call - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout the repository - uses: actions/checkout@v2 - - - name: Setup Go - uses: actions/setup-go@v3 - with: - go-version: '>=1.17.0' - - - name: Docker pull - run: docker-compose pull - - - name: Start containers - run: docker-compose up -d - - - name: Run Integration Tests - run: go test -tags=integration ./... - - - name: Stop containers - if: always() - run: docker-compose -f "docker-compose.yml" down diff --git a/.github/workflows/tests-unit.yml b/.github/workflows/tests-unit.yml deleted file mode 100644 index 2bd43ee..0000000 --- a/.github/workflows/tests-unit.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Run Unit Tests -on: - workflow_call - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout the repository - uses: actions/checkout@v2 - - - name: Setup Go - uses: actions/setup-go@v3 - with: - go-version: '>=1.17.0' - - - name: Run Unit Tests - run: go test ./...