Skip to content

Commit

Permalink
ci: upgrade github actions (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeDombo authored Apr 4, 2024
1 parent 7bd443b commit ace126c
Showing 1 changed file with 31 additions and 23 deletions.
54 changes: 31 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,42 +21,44 @@ jobs:
- name: Enable core.longpaths
run: git config --global core.longpaths true
if: matrix.os == 'windows-latest'
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v2
- 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: Init Submodule
run: git submodule update --init
- name: Maven Preprocess
run: mvn -U -ntp clean process-resources
- name: Build with Maven
run: mvn -U -ntp clean verify
- name: Upload Failed Test Report for aws-greengrass-testing-features-api
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v3
if: failure()
with:
name: Failed Test Report ${{ matrix.os }}
path: aws-greengrass-testing-features/aws-greengrass-testing-features-api/target/surefire-reports
- name: Upload Failed Test Report for aws-greengrass-testing-launcher
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v3
if: failure()
with:
name: Failed Test Report ${{ matrix.os }}
path: aws-greengrass-testing-launcher/target/surefire-reports
- name: Upload Failed Test Report for aws-greengrass-testing-platform-api
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v3
if: failure()
with:
name: Failed Test Report ${{ matrix.os }}
path: aws-greengrass-testing-platform/aws-greengrass-testing-platform-api/target/surefire-reports
- name: Upload Failed Test Report for aws-greengrass-testing-platform-pillbox
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v3
if: failure()
with:
name: Failed Test Report ${{ matrix.os }}
Expand All @@ -74,31 +76,31 @@ jobs:
run: python3 .github/scripts/cover2cover.py aws-greengrass-testing-platform/aws-greengrass-testing-platform-pillbox/target/jacoco-report/jacoco.xml src/main/java > aws-greengrass-testing-platform/aws-greengrass-testing-platform-pillbox/target/jacoco-report/cobertura.xml
if: matrix.os == 'ubuntu-latest'
- name: Upload Coverage for aws-greengrass-testing-features-api
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
with:
name: Coverage Report
path: aws-greengrass-testing-features/aws-greengrass-testing-features-api/target/jacoco-report
- name: Upload Coverage for aws-greengrass-testing-launcher
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
with:
name: Coverage Report
path: aws-greengrass-testing-launcher/target/jacoco-report
- name: Upload Coverage for aws-greengrass-testing-platform-api
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
with:
name: Coverage Report
path: aws-greengrass-testing-platform/aws-greengrass-testing-platform-api/target/jacoco-report
- name: Upload Coverage for aws-greengrass-testing-platform-pillbox
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
with:
name: Coverage Report
path: aws-greengrass-testing-platform/aws-greengrass-testing-platform-pillbox/target/jacoco-report
- name: cobertura-report-unit-test for aws-greengrass-testing-features
uses: shaguptashaikh/cobertura-action@master
uses: 5monkeys/cobertura-action@v14
continue-on-error: true
with:
# The GITHUB_TOKEN for this repo
Expand All @@ -117,8 +119,9 @@ jobs:
show_class_names: true
# Use a unique name for the report and comment
report_name: Unit Tests Coverage Report for aws-greengrass-testing-features
only_changed_files: true
- name: cobertura-report-unit-test for aws-greengrass-testing-launcher
uses: shaguptashaikh/cobertura-action@master
uses: 5monkeys/cobertura-action@v14
continue-on-error: true
with:
# The GITHUB_TOKEN for this repo
Expand All @@ -137,8 +140,9 @@ jobs:
show_class_names: true
# Use a unique name for the report and comment
report_name: Unit Tests Coverage Report for aws-greengrass-testing-launcher
only_changed_files: true
- name: cobertura-report-unit-test for aws-greengrass-testing-platform-api
uses: shaguptashaikh/cobertura-action@master
uses: 5monkeys/cobertura-action@v14
continue-on-error: true
with:
# The GITHUB_TOKEN for this repo
Expand All @@ -157,8 +161,9 @@ jobs:
show_class_names: true
# Use a unique name for the report and comment
report_name: Unit Tests Coverage Report for aws-greengrass-testing-platform-api
only_changed_files: true
- name: cobertura-report-unit-test for aws-greengrass-testing-platform-pillbox
uses: shaguptashaikh/cobertura-action@master
uses: 5monkeys/cobertura-action@v14
continue-on-error: true
with:
# The GITHUB_TOKEN for this repo
Expand All @@ -177,22 +182,25 @@ jobs:
show_class_names: true
# Use a unique name for the report and comment
report_name: Unit Tests Coverage Report for aws-greengrass-testing-platform-pillbox
only_changed_files: true


check-binary-compatability:
runs-on: ubuntu-latest
steps:
- name: Checkout HEAD
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
ref: ${{ github.event.pull_request.base.sha }}
path: 'otf-old-japicmp'
- 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 HEAD
run: |
cd otf-old-japicmp
Expand All @@ -205,7 +213,7 @@ jobs:
# Install artifacts with dummy version in local repository; used later by Maven plugin for comparison
mvn --batch-mode --no-transfer-progress install -DskipTests
- name: Checkout new commit
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Build new commit
run: |
# Init Submodule
Expand All @@ -220,7 +228,7 @@ jobs:
python3 .github/scripts/binaryCompatibility.py --input aws-greengrass-testing-standalone/target/japicmp/default-cli.xml --token "${{ github.token }}"
if: github.event_name == 'pull_request'
- name: Upload Compatibility Report
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v3
with:
name: Binary Compatibility Report
path: aws-greengrass-testing-standalone/target/japicmp/default-cli.html
Expand All @@ -239,7 +247,7 @@ jobs:
git secrets --register-aws --global
echo "Added aws secret templates"
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Run Git Secrets
run: |
git secrets --scan
Expand All @@ -260,7 +268,7 @@ jobs:
os: [ ubuntu-latest ]
steps:
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::686385081908:role/aws-greengrass-testing-codebuild-uat-role-amazonlinux
role-session-name: otfCI
Expand Down

0 comments on commit ace126c

Please sign in to comment.