Skip to content

Commit

Permalink
FUSETOOLS2-2519 - use Ubuntu latest 24.04 on GitHub CI
Browse files Browse the repository at this point in the history
Signed-off-by: Aurélien Pupier <[email protected]>
  • Loading branch information
apupier committed Jan 15, 2025
1 parent 5dc2a18 commit f39679e
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 25 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/camel_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, macos-latest, windows-latest ]
os: [ ubuntu-latest, macos-latest, windows-latest ]
camel-version: [ "4.4.0", "4.0.0.redhat-00036", "4.4.0.redhat-00019"]
timeout-minutes: 30

Expand All @@ -41,7 +41,7 @@ jobs:
run: java --version

- name: Install JBang (ubuntu, macOS)
if: matrix.os == 'ubuntu-22.04' || matrix.os == 'macos-latest'
if: ${{ startsWith(matrix.os, 'ubuntu') }} || matrix.os == 'macos-latest'
run: |
curl -Ls https://sh.jbang.dev | bash -s - app setup
echo "$HOME/.jbang/bin" >> $GITHUB_PATH
Expand All @@ -65,14 +65,18 @@ jobs:
- name: npm-ci
run: npm ci

- name: Allow unprivileged user namespace (ubuntu)
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

- name: ui test (ubuntu)
id: uiTest_Ubuntu
if: matrix.os == 'ubuntu-22.04'
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: xvfb-run --auto-servernum npm run ui-test

- name: ui test (macos, windows)
id: uiTest_MacOS_Windows
if: matrix.os != 'ubuntu-22.04'
if: ${{ !startsWith(matrix.os, 'ubuntu') }}
run: npm run ui-test

- name: vsce package
Expand Down Expand Up @@ -104,7 +108,7 @@ jobs:

check:
if: always()
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
name: Status Check
needs: [ camel ]
steps:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
CODE_VERSION: max
TEST_RESOURCES: test-resources

runs-on: ubuntu-22.04
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
Expand Down Expand Up @@ -50,6 +50,9 @@ jobs:
- name: Compile
run: npm run compile

- name: Allow unprivileged user namespace (ubuntu)
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

# 'set +e' and 'exit 0' - that means the workflow will not fail even the test failures are present. The failing tests are not directive for the code coverage reports itself
- name: Coverage
run: |
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
CODE_VERSION: max
TEST_RESOURCES: test-resources

runs-on: ubuntu-22.04
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
Expand Down Expand Up @@ -63,6 +63,9 @@ jobs:
- name: Compile
run: npm run compile

- name: Allow unprivileged user namespace (ubuntu)
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

- name: UI Tests
run: |
eval $(minikube -p minikube docker-env)
Expand All @@ -77,7 +80,7 @@ jobs:

check:
if: always()
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
name: Status Check
needs: [ deploy ]
steps:
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/insider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
insider:
strategy:
matrix:
os: [ ubuntu-22.04, macos-latest, windows-latest ]
os: [ ubuntu-latest, macos-latest, windows-latest ]
version: [ latest ] # [ x.x.x | latest | max ]
type: [ insider ] # [ stable | insider ]
fail-fast: false
Expand All @@ -36,7 +36,7 @@ jobs:
distribution: "temurin"

- name: Install JBang (ubuntu, macOS)
if: matrix.os == 'ubuntu-22.04' || matrix.os == 'macos-latest'
if: ${{ startsWith(matrix.os, 'ubuntu') }} || matrix.os == 'macos-latest'
run: |
curl -Ls https://sh.jbang.dev | bash -s - app setup
echo "$HOME/.jbang/bin" >> $GITHUB_PATH
Expand All @@ -62,30 +62,34 @@ jobs:
- name: npm-compile
run: npm run compile

- name: Allow unprivileged user namespace (ubuntu)
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

- name: test (ubuntu)
if: matrix.os == 'ubuntu-22.04'
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: xvfb-run --auto-servernum npm test

- name: test (macos, windows)
if: matrix.os != 'ubuntu-22.04'
if: ${{ !startsWith(matrix.os, 'ubuntu') }}
run: npm test

- name: ui test (ubuntu)
id: uiTest_Ubuntu
if: matrix.os == 'ubuntu-22.04'
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: xvfb-run --auto-servernum npm run ui-test

- name: ui test (macos, windows)
id: uiTest_MacOS_Windows
if: matrix.os != 'ubuntu-22.04'
if: ${{ !startsWith(matrix.os, 'ubuntu') }}
run: npm run ui-test

- name: vsce package
run: vsce package

- name: Store VS Code Logs (Ubuntu)
uses: actions/upload-artifact@v4
if: failure() && matrix.os == 'ubuntu-22.04'
if: failure() && ${{ startsWith(matrix.os, 'ubuntu') }}
with:
name: ${{ matrix.os }}-${{ matrix.version }}-vscode-logs
path: ~/.config/Code/logs/*
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
main:
strategy:
matrix:
os: [ ubuntu-22.04, macos-latest, windows-latest ]
os: [ ubuntu-latest, macos-latest, windows-latest ]
version: [ "1.90.2", max ] # [ "x.x.x" | latest | max ]
type: [ stable ] # [ stable | insider ]
fail-fast: false
Expand All @@ -38,7 +38,7 @@ jobs:
distribution: "temurin"

- name: Install JBang (ubuntu, macOS)
if: matrix.os == 'ubuntu-22.04' || matrix.os == 'macos-latest'
if: ${{ startsWith(matrix.os, 'ubuntu') }} || matrix.os == 'macos-latest'
run: |
curl -Ls https://sh.jbang.dev | bash -s - app setup
echo "$HOME/.jbang/bin" >> $GITHUB_PATH
Expand All @@ -65,18 +65,22 @@ jobs:
- name: npm-compile
run: npm run compile

- name: Allow unprivileged user namespace (ubuntu)
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

- name: test (ubuntu)
id: test_Ubuntu
if: matrix.os == 'ubuntu-22.04'
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: xvfb-run --auto-servernum npm test

- name: test (macos, windows)
if: matrix.os != 'ubuntu-22.04'
if: ${{ !startsWith(matrix.os, 'ubuntu') }}
run: npm test

- name: ui test (ubuntu)
id: uiTest_Ubuntu
if: matrix.os == 'ubuntu-22.04'
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: xvfb-run --auto-servernum npm run ui-test

- name: ui test (macos)
Expand All @@ -96,11 +100,11 @@ jobs:

- name: get-npm-version
id: package-version
if: matrix.os == 'ubuntu-22.04'
if: ${{ startsWith(matrix.os, 'ubuntu') }}
uses: martinbeentjes/[email protected]

- name: Generate SBOM
if: matrix.os == 'ubuntu-22.04'
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
npm install --global @cyclonedx/cyclonedx-npm
cyclonedx-npm --omit dev --output-file node-sbom.json
Expand All @@ -110,14 +114,14 @@ jobs:
- name: Store SBOM
uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-22.04' && matrix.version == 'max'
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.version == 'max' }}
with:
name: sbom
path: manifest.json

- name: Store VS Code Logs (Ubuntu)
uses: actions/upload-artifact@v4
if: failure() && matrix.os == 'ubuntu-22.04'
if: failure() && ${{ startsWith(matrix.os, 'ubuntu') }}
with:
name: ${{ matrix.os }}-${{ matrix.version }}-vscode-logs
path: ~/.config/Code/logs/*
Expand Down Expand Up @@ -162,7 +166,7 @@ jobs:

check:
if: always()
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
name: Status Check
needs: [ main ]
steps:
Expand Down

0 comments on commit f39679e

Please sign in to comment.