Skip to content

Commit

Permalink
Update GitHub actions (#7059)
Browse files Browse the repository at this point in the history
  • Loading branch information
glen-84 authored Apr 14, 2024
1 parent ed99eb6 commit 9f41a5f
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 55 deletions.
20 changes: 12 additions & 8 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
"🌶️ green donut":
- "src/GreenDonut/**/*"
- changed-files:
- any-glob-to-any-file: "src/GreenDonut/**"
"🌶️ hot chocolate":
- "src/HotChocolate/**/*"
- changed-files:
- any-glob-to-any-file: "src/HotChocolate/**"
"🌶️ strawberry shake":
- "src/StrawberryShake/**/*"
- changed-files:
- any-glob-to-any-file: "src/StrawberryShake/**"
"🌶️ website":
- any: ['website/**/*', '!website/src/docs/**/*.md']
- changed-files:
- all-globs-to-any-file: ["website/**", "!website/src/docs/**/*.md"]
"📚 documentation":
- "website/src/docs/**/*.md"
- changed-files:
- any-glob-to-any-file: "website/src/docs/**/*.md"
"🧰 maintenance":
- ".build/**/*"
- ".github/**/*"
- ".devops/**/*"
- changed-files:
- any-glob-to-any-file: [".build/**", ".github/**", ".devops/**"]
4 changes: 3 additions & 1 deletion .github/workflows/ci-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
show-progress: false

- name: Cleanup
run: |
Expand Down
63 changes: 38 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ jobs:
src_changes: ${{ steps.check-src.outputs.src_changes }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 2
show-progress: false

- name: Check for changes in website directory
id: check-website
Expand Down Expand Up @@ -61,21 +62,21 @@ jobs:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/labeler@v5

spellcheck:
name: "Spellcheck Documentation"
runs-on: ubuntu-latest
needs: check-changes
if: needs.check-changes.outputs.website_changes == 'true'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
name: Check out the code
with:
show-progress: false

- name: Install Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
Expand All @@ -92,6 +93,8 @@ jobs:
steps:
- uses: actions/checkout@v4
name: Check out the code
with:
show-progress: false
- uses: actions/setup-node@v4
name: Setup node
with:
Expand All @@ -107,17 +110,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
show-progress: false

- name: Install Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '14.x'
cache: 'yarn'
cache-dependency-path: 'website/yarn.lock'

- name: Cache Yarn Packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
website/.yarn/cache
Expand Down Expand Up @@ -145,10 +150,12 @@ jobs:

steps:
- name: Checkout to repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
show-progress: false

- name: Install .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
7.x
Expand All @@ -173,10 +180,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
show-progress: false

- name: Install .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.x
Expand Down Expand Up @@ -205,7 +214,7 @@ jobs:

- name: Upload test_output.txt for debugging
if: steps.run-tests.outcome == 'failure'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: test-output
path: test_output.txt
Expand Down Expand Up @@ -255,21 +264,21 @@ jobs:
- name: Upload Test Results as Artifacts
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.name }}
path: ./output/test-results/*.trx

- name: Upload Coverage Files as Artifacts
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.name }}
path: ./output/coverage/*.xml

- name: Upload mismatch files as Artifacts
if: steps.run-tests.outcome == 'failure'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: mismatch-files-${{ matrix.name }}
path: |
Expand All @@ -290,10 +299,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
show-progress: false

- name: Install .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.x
Expand All @@ -304,15 +315,15 @@ jobs:
run: ./build.sh restore

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: csharp

- name: Build
run: dotnet build ./src/All.sln --no-restore

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3

merge-coverage:
name: Merge and Upload Coverage
Expand All @@ -321,11 +332,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
show-progress: false

- name: Install .NET
if: ${{ !cancelled() }}
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.x
Expand All @@ -342,7 +355,7 @@ jobs:

- name: Download all coverage artifacts
if: ${{ !cancelled() }}
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
path: ./output/download

Expand All @@ -357,7 +370,7 @@ jobs:

- name: Upload Combined Coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v4
timeout-minutes: 10
with:
file: ./output/coverage/merged/OpenCover.xml
Expand Down
28 changes: 17 additions & 11 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ jobs:

steps:
- name: Checkout to repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
show-progress: false

- name: Install .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
7.x
Expand All @@ -48,10 +50,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
show-progress: false

- name: Install .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.x
Expand All @@ -73,14 +77,14 @@ jobs:

- name: Upload Test Results as Artifacts
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.name }}
path: ./.test-results/*.trx

- name: Upload mismatch files as Artifacts
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: mismatch-files-${{ matrix.name }}
path: |
Expand All @@ -93,7 +97,7 @@ jobs:
cp "${{ matrix.directoryPath }}/.coverage/${{ matrix.name }}.net7.0.xml" ./output/coverage/
- name: Upload Individual Coverage Files as Artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.name }}
path: ./output/coverage/*.xml
Expand All @@ -111,10 +115,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
show-progress: false

- name: Install .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.x
Expand All @@ -130,7 +136,7 @@ jobs:
run: dotnet build ./src/All.sln

- name: Download all coverage artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
path: ./output/download

Expand All @@ -145,7 +151,7 @@ jobs:

- name: Upload Combined Coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v4
timeout-minutes: 10
with:
file: ./output/coverage/merged/OpenCover.xml
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/publish-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
show-progress: false

- name: Docker Login
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ secrets.CONTAINER_REG_URL }}
username: ${{ secrets.CONTAINER_REG_USERNAME }}
Expand All @@ -28,14 +30,14 @@ jobs:
- run: echo ${{ secrets.CONTAINER_REG_URL }}

- name: Install Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: "18.x"
cache: "yarn"
cache-dependency-path: "website/yarn.lock"

- name: Cache Yarn Packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
website/.yarn/cache
Expand All @@ -53,15 +55,15 @@ jobs:
working-directory: website

- name: Build WebSite Container
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: .docker/website/dockerfile
push: true
tags: ${{ secrets.CONTAINER_REG_DOMAIN }}/ccc-website-${{ github.ref_name }}:${{ github.run_id }}

- name: Deploy to Azure WebApp
uses: azure/webapps-deploy@v2
uses: azure/webapps-deploy@v3
with:
app-name: ccc-p-us1-website
slot-name: "production"
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/qodana_code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ jobs:
qodana:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false

- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2023.2
uses: JetBrains/qodana-action@v2023.3
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
Loading

0 comments on commit 9f41a5f

Please sign in to comment.