Skip to content

Commit

Permalink
ci: upgrade github actions (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeDombo authored Apr 4, 2024
1 parent 23a4540 commit 40a78a4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v4
- uses: wagoid/commitlint-github-action@v6
if: matrix.os == 'ubuntu-latest'
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 1.8
distribution: corretto
java-version: 8
cache: maven
- name: Build with Maven (Windows)
env:
TEMP: "C:\\Temp"
Expand All @@ -30,7 +32,7 @@ jobs:
run: mvn -U -ntp clean verify
if: matrix.os != 'windows-latest'
- name: Upload Failed Test Report
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v3
if: failure()
with:
name: Failed Test Report ${{ matrix.os }}
Expand All @@ -41,13 +43,13 @@ jobs:
python3 ./.github/scripts/cover2cover.py server/target/jacoco-report/jacoco.xml src/main/java > server/target/jacoco-report/cobertura.xml
if: matrix.os == 'ubuntu-latest'
- name: Upload Client Coverage
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
with:
name: Client Coverage Report
path: client/target/jacoco-report
- name: Upload Server Coverage
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
with:
name: Server Coverage Report
Expand All @@ -63,7 +65,7 @@ jobs:
cp server/target/jacoco-report/cobertura.xml ./pr/server/jacoco-report/cobertura.xml
if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest'
- name: Upload files
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: pr
path: pr/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/externalPR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ jobs:
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
name: Comment
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Download artifact'
uses: actions/github-script@v3.1.0
uses: actions/github-script@v7
with:
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr"
})[0];
var download = await github.actions.downloadArtifact({
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
Expand All @@ -38,10 +38,10 @@ jobs:
- run: unzip pr.zip
- name: outputs
run: |-
echo '::set-output name=PR::$(cat NR)'
echo '::set-output name=SHA::$(cat SHA)'
echo "PR=$(cat NR)" >> $GITHUB_ENV
echo "SHA=$(cat SHA)" >> $GITHUB_ENV
- name: cobertura-report-client-test
uses: 5monkeys/cobertura-action@master
uses: 5monkeys/cobertura-action@v14
continue-on-error: true
with:
# The GITHUB_TOKEN for this repo
Expand All @@ -60,9 +60,9 @@ jobs:
show_class_names: true
# Use a unique name for the report and comment
report_name: Client Coverage Report
pull_request_number: ${{ steps.outputs.outputs.PR }}
pull_request_number: ${{ env.PR }}
- name: cobertura-report-server-test
uses: 5monkeys/cobertura-action@master
uses: 5monkeys/cobertura-action@v14
continue-on-error: true
with:
# The GITHUB_TOKEN for this repo
Expand All @@ -81,4 +81,4 @@ jobs:
show_class_names: true
# Use a unique name for the report and comment
report_name: Server Coverage Report
pull_request_number: ${{ steps.outputs.outputs.PR }}
pull_request_number: ${{ env.PR }}

0 comments on commit 40a78a4

Please sign in to comment.