Skip to content

Commit

Permalink
Merge pull request #48 from Accenture/github_actions_migration
Browse files Browse the repository at this point in the history
GitHub actions migration
  • Loading branch information
raczeja authored Feb 21, 2024
2 parents 1907e02 + c1a2eee commit 6fa77e3
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 3 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Maven
# Build your Java project and run tests with Apache Maven.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/java

on:
push:
branches:
- '*'
paths-ignore:
- README.md
- gh-pages
tags:
- '*'
schedule:
- cron: '0 19 * * 0'
jobs:
build:
runs-on: ubuntu-latest
env:
dBTestCompareVersion: 1.9.5
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
- uses: cedx/setup-ant@v2
- shell: pwsh
run: |
$tags = git tag --sort=-creatordate
$tag = $tags[0]
Write-Host "##vso[task.setvariable variable=dBTestCompareVersion]$tag"
if: startsWith(github.ref, 'refs/tags/')
- shell: pwsh
run: |
./setDBTestCompareVersion.ps1
- shell: pwsh
run: |
./downloadBackupAndJDBCDrivers.ps1
- run: docker-compose -f "./docker/docker-compose.yml" up -d
- shell: pwsh
run: |
./restoreBackup.ps1
- name: Run ant build
run: ant -noinput -buildfile ./deploy/build.xml -Dconfig=DEV02 compile tokens.copy.files testdbq.run
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
report_paths: '**/TEST-*.xml'
- shell: pwsh
run: |
./copyArtifact.ps1
- uses: actions/upload-artifact@v4
with:
name: DBTestCompare${{ env.dBTestCompareVersion }}.TestResults.${{github.run_number}}
path: ./target/test-output
- uses: actions/upload-artifact@v4
with:
name: DBTestCompare${{ env.dBTestCompareVersion }}.TestDefinitionsResults.${{github.run_number}}
path: ./target/test-definitions
- uses: actions/upload-artifact@v4
with:
name: DBTestCompare${{ env.dBTestCompareVersion }}
path: ./release
- shell: pwsh
run: compress-archive -path "./release" ./release/DBTestCompare${{ env.dBTestCompareVersion }}.zip
- shell: pwsh
run: Copy './release/DBTestCompare${{ env.dBTestCompareVersion }}.zip' '${{ github.workspace }}'
- name: Create Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: ./release/DBTestCompare${{ env.dBTestCompareVersion }}.zip
tag: ${{ env.dBTestCompareVersion }}
name: "Version ${{ env.dBTestCompareVersion }}"
skipIfReleaseExists: true
if: success() && startsWith(github.ref, 'refs/tags/')
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

**Application to compare results of two SQL queries**

[![Build Status](https://dev.azure.com/DBTestCompare/Build/_apis/build/status/ObjectivityLtd.DBTestCompare)](https://dev.azure.com/DBTestCompare/Build/_build?definitionId=1&_a=summary)
[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/DBTestCompare/Build/1?compact_message)](https://dev.azure.com/DBTestCompare/Build/_build?definitionId=1&_a=summary)

![DBTestCompare Build](https://github.com/Accenture/DBTestCompare/actions/workflows/github-actions.yml/badge.svg)

It **reads tests definitions in XML** format form [specified directory](https://github.com/ObjectivityLtd/DBTestCompare/tree/master/test-definitions) and than runs them (as TestNG test).

Expand Down
Empty file modified downloadBackupAndJDBCDrivers.ps1
100644 → 100755
Empty file.
Binary file added images/Githubactions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified setDBTestCompareVersion.ps1
100644 → 100755
Empty file.

0 comments on commit 6fa77e3

Please sign in to comment.