Skip to content

Commit

Permalink
Fix pipeline step
Browse files Browse the repository at this point in the history
  • Loading branch information
SyzSteM committed Jan 25, 2024
1 parent fc534ab commit 28cc0d7
Showing 1 changed file with 54 additions and 54 deletions.
108 changes: 54 additions & 54 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,44 @@ on:
pull_request:

jobs:
build-and-test:
uses: ASE-WS23-GruppeA/workout-tracker/.github/workflows/gradle-build-and-test.yml@main

test-and-upload-coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v4

- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: 21

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: '8.5'

- name: Execute Gradle build
run: ./gradlew clean jacocoTestReport

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: coverage_report
path: build/reports/jacoco/test/html

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: build/reports/jacoco/test/jacocoTestReport.xml
fail_ci_if_error: true
# build-and-test:
# uses: ASE-WS23-GruppeA/workout-tracker/.github/workflows/gradle-build-and-test.yml@main
#
# test-and-upload-coverage:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout project sources
# uses: actions/checkout@v4
#
# - name: Setup Java JDK
# uses: actions/[email protected]
# with:
# distribution: 'temurin'
# java-version: 21
#
# - name: Validate Gradle wrapper
# uses: gradle/wrapper-validation-action@v1
#
# - name: Setup Gradle
# uses: gradle/gradle-build-action@v2
# with:
# gradle-version: '8.5'
#
# - name: Execute Gradle build
# run: ./gradlew clean jacocoTestReport
#
# - name: Upload build artifacts
# uses: actions/upload-artifact@v4
# with:
# name: coverage_report
# path: build/reports/jacoco/test/html
#
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# files: build/reports/jacoco/test/jacocoTestReport.xml
# fail_ci_if_error: true

test-performance:
runs-on: ubuntu-latest
Expand All @@ -53,7 +53,7 @@ jobs:
- name: Setup docker-compose
uses: KengoTODA/[email protected]
with:
version: '3.8'
version: '2.14.2'

- name: Start docker-compose
run: docker compose up -d
Expand Down Expand Up @@ -83,18 +83,18 @@ jobs:
name: jmeter-html-reports
path: reports
if-no-files-found: error

build-and-push-docker:
needs: build-and-test
uses: ASE-WS23-GruppeA/workout-tracker/.github/workflows/docker-build-and-push.yml@main
with:
docker_image_tag: 'registry.digitalocean.com/do-ase-registry/user-service'
secrets:
DIGITALOCEAN_ACCESS_TOKEN: "${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}"

restart-application:
needs: build-and-push-docker
uses: ASE-WS23-GruppeA/workout-tracker/.github/workflows/docker-compose-restart.yml@main
secrets:
DROPLET_IP_ADDRESS: "${{ secrets.DROPLET_IP_ADDRESS }}"
DROPLET_SSH_KEY: "${{ secrets.DROPLET_SSH_KEY }}"
#
# build-and-push-docker:
# needs: build-and-test
# uses: ASE-WS23-GruppeA/workout-tracker/.github/workflows/docker-build-and-push.yml@main
# with:
# docker_image_tag: 'registry.digitalocean.com/do-ase-registry/user-service'
# secrets:
# DIGITALOCEAN_ACCESS_TOKEN: "${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}"
#
# restart-application:
# needs: build-and-push-docker
# uses: ASE-WS23-GruppeA/workout-tracker/.github/workflows/docker-compose-restart.yml@main
# secrets:
# DROPLET_IP_ADDRESS: "${{ secrets.DROPLET_IP_ADDRESS }}"
# DROPLET_SSH_KEY: "${{ secrets.DROPLET_SSH_KEY }}"

0 comments on commit 28cc0d7

Please sign in to comment.