demo testing 3 #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: '**' | |
pull_request: | |
branches: [ main, code-action-unification ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
runtime: [ linux, mac, windows ] | |
include: | |
- runtime: linux | |
os: ubuntu-latest | |
reportName: linux-test-report | |
- runtime: mac | |
os: macOS-latest | |
reportName: mac-test-report | |
- runtime: windows | |
os: windows-latest | |
reportName: windows-test-report | |
steps: | |
- name: Configure pagefile | |
if: contains(matrix.os, 'windows') | |
uses: al-cheb/[email protected] | |
with: | |
minimum-size: 8GB | |
maximum-size: 10GB | |
disk-root: "C:" | |
- name: 'Checkout lsp4ij' | |
uses: actions/checkout@v3 | |
with: | |
repository: MicroShed/lsp4ij | |
path: lsp4ij | |
ref: refs/tags/0.0.4 | |
- name: 'Checkout liberty-tools-intellij' | |
uses: actions/checkout@v3 | |
with: | |
path: liberty-tools-intellij | |
- name: 'Install required integration test software' | |
working-directory: ./liberty-tools-intellij | |
run: bash ./src/test/resources/ci/scripts/setup.sh | |
- name: 'Build lsp4ij jar and publish to local Maven repository' | |
working-directory: ./lsp4ij | |
run: bash ./gradlew publishToMavenLocal | |
- name: 'Build Liberty-Tools-Intellij' | |
working-directory: ./liberty-tools-intellij | |
run: bash ./gradlew buildPlugin | |
- name: 'Archive artifacts' | |
if: ${{ runner.os == 'Linux' && !failure() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: liberty-tools-intellij-${{ github.sha }} | |
path: | | |
./**/*liberty-tools-intellij*.zip | |
./**/libs/*liberty-tools-intellij*.jar | |
if-no-files-found: warn | |
retention-days: 7 | |
- name: 'Run UI integration tests' | |
working-directory: ./liberty-tools-intellij | |
run: bash ./src/test/resources/ci/scripts/run.sh | |
- name: 'Archive Test logs and reports' | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.reportName }} | |
path: | | |
liberty-tools-intellij/build/reports/ | |
# Send Slack notification | |
# - name: Send Slack notification | |
## if: always() | |
## env: | |
## SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
## run: | | |
## curl -X POST -H 'Content-type: application/json' --data '{"text":"Build completed for branch: ${{ github.ref }} with status: ${{ job.status }}"}' $SLACK_WEBHOOK_URL | |
- name: Slack Notification | |
if: always() # Ensure the notification is sent regardless of job statuses | |
run: | | |
curl -X POST -H 'Content-type: application/json' --data '{ | |
"text": "Workflow ${{ github.workflow }} triggered by branch ${{ github.ref }}. PR: ${{ github.event.pull_request.html_url }}. Build results: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}. Status: ${{ job.status }}" | |
}' $SLACK_WEBHOOK_URL | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |