Skip to content

Commit

Permalink
Fix / GitHub actions deprecation warnings (#194)
Browse files Browse the repository at this point in the history
* Update standard actions in build.yml

* Update standard actions in build.yml

* Update standard actions in integration.yml

* Update standard actions in packaging and compliance workflows

* Don't specify point versions for upload release artifacts action

* Move to v3 of the setup-java action

* Replace explicit save-output commands in GitHub workflows

* Set Python version in end-to-end integration test
  • Loading branch information
martin-traverse committed Oct 27, 2022
1 parent 463bcf3 commit 990a091
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 56 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:

# fetch-depth = 0 is needed to get tags for version info
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ matrix.JAVA_VERSION }}
Expand All @@ -51,7 +51,7 @@ jobs:

# If the tests fail, make the output available for download
- name: Store failed test results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: failure()
with:
name: junit-test-results
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
steps:

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.enviroment.PYTHON_VERSION }}

Expand All @@ -125,7 +125,7 @@ jobs:

# fetch-depth = 0 is needed to get tags for version info
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down Expand Up @@ -163,12 +163,12 @@ jobs:

# fetch-depth = 0 is needed to get tags for version info
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
Expand All @@ -192,7 +192,7 @@ jobs:
steps:

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9

Expand All @@ -201,7 +201,7 @@ jobs:

# fetch-depth = 0 is needed to get tags for version info
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ jobs:

# fetch-depth = 0 is needed to get tags for version info
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
Expand All @@ -53,7 +53,7 @@ jobs:
# Use a cache to save downloading the whole NVD on every build
# Dependency check will automatically look for updates and download the delta
- name: NVD cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
key: compliance-cache-data
path: ./build/compliance-cache
Expand All @@ -66,7 +66,7 @@ jobs:

# Always save the reports - they are especially needed when the checks have failed!
- name: Store compliance reports
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: always()
with:
name: compliance-reports
Expand All @@ -81,12 +81,12 @@ jobs:

# fetch-depth = 0 is needed to get tags for version info
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
# Always save the reports - they are especially needed when the checks have failed!
- name: Store compliance reports
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: always()
with:
name: compliance-reports
Expand All @@ -134,12 +134,12 @@ jobs:

# fetch-depth = 0 is needed to get tags for version info
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
Expand All @@ -148,7 +148,7 @@ jobs:
# Use a cache to save downloading global compliance data on every build (e.g. NVD)
# Compliance tasks will automatically look for updates and download deltas
- name: NVD cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
key: compliance-cache-data
path: ./build/compliance-cache
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
# Always save the reports - they are especially needed when the checks have failed!
- name: Store compliance reports
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: always()
with:
name: compliance-reports
Expand All @@ -198,7 +198,7 @@ jobs:

# fetch-depth = 0 is needed to get tags for version info
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -207,10 +207,10 @@ jobs:
run: |
tracdap_version=`dev/version.sh`
echo "tracdap_version = ${tracdap_version}"
echo "::set-output name=tracdap_version::${tracdap_version}"
echo "tracdap_version=${tracdap_version}" >> $GITHUB_OUTPUT
- name: Fetch copmliance report artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: compliance-reports
path: tracdap-compliance-reports-${{ steps.tracdap-version.outputs.tracdap_version }}
Expand All @@ -219,7 +219,7 @@ jobs:
run: tar -cvzf tracdap-compliance-reports-${{ steps.tracdap-version.outputs.tracdap_version }}.tgz tracdap-compliance-reports-${{ steps.tracdap-version.outputs.tracdap_version }}/

- name: Publish compliance reports
uses: actions/upload-release-asset@v1.0.1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:
env:
JAVA_VERSION: 11
JAVA_DISTRIBUTION: zulu
PYTHON_VERSION: "3.10"


jobs:
Expand All @@ -31,12 +32,12 @@ jobs:

# fetch-depth = 0 is needed to get tags for version info
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
Expand All @@ -50,7 +51,7 @@ jobs:

# If the tests fail, make the output available for download
- name: Store failed test results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: failure()
with:
name: junit-test-results
Expand All @@ -67,12 +68,12 @@ jobs:

# fetch-depth = 0 is needed to get tags for version info
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Java - Setup
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
Expand All @@ -84,7 +85,7 @@ jobs:
run: ./gradlew build -x test

- name: Python - setup
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand All @@ -103,7 +104,7 @@ jobs:

# If the tests fail, make the output available for download
- name: Store failed test results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: failure()
with:
name: junit-test-results
Expand Down Expand Up @@ -185,12 +186,12 @@ jobs:

# fetch-depth = 0 is needed to get tags for version info
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
Expand All @@ -211,7 +212,7 @@ jobs:

# If the tests fail, make the output available for download
- name: Store failed test results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: failure()
with:
name: junit-test-results
Expand Down
Loading

0 comments on commit 990a091

Please sign in to comment.