chore(deps): update node.js to v20 #486
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
merge_group: | |
push: | |
jobs: | |
build: | |
name: "Build and Test on Node ${{ matrix.node_version }} and ${{ matrix.os }}" | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
node_version: | |
- 16 | |
- 18 | |
- 20 | |
os: | |
- ubuntu-latest | |
- macOS-latest | |
- windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Use Node.js ${{ matrix.node_version }}" | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "${{ matrix.node_version }}" | |
- name: npm build and test | |
run: | | |
npm run clean | |
npm run build | |
npm run test | |
chart: | |
name: "Build and Test Helm Chart" | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: v3.11.2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
check-latest: true | |
- name: Helm Chart Testing | |
uses: helm/[email protected] | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> "$GITHUB_OUTPUT" | |
fi | |
- name: Run chart-testing (lint) | |
if: steps.list-changed.outputs.changed == 'true' | |
run: ct lint --target-branch ${{ github.event.repository.default_branch }} --check-version-increment false | |
- name: Create kind cluster | |
if: steps.list-changed.outputs.changed == 'true' | |
uses: helm/[email protected] | |
- name: Run chart-testing (install) | |
if: steps.list-changed.outputs.changed == 'true' | |
run: ct install --target-branch ${{ github.event.repository.default_branch }} --helm-extra-set-args "--set 'keycloak.config.url=http://localhost:8080' --set 'keycloak.config.url=http://localhost:8080' --set 'keycloak.config.clientId=clientId' --set 'keycloak.config.clientSecret=clientSecret' --set 'keycloak.config.webhookType=test' --set 'keycloak.config.webhookUrl=http://localhost:8888'" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dist-folder | |
path: dist | |
end2end: | |
name: "End2End Test on Node ${{ matrix.node_version }} and ${{ matrix.os }}" | |
runs-on: "${{ matrix.os }}" | |
needs: | |
- build | |
- chart | |
strategy: | |
matrix: | |
node_version: | |
- 16 | |
# TODO: Support Node 16+ | |
#- 18 | |
#- 20 | |
os: | |
- ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Use Node.js ${{ matrix.node_version }}" | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "${{ matrix.node_version }}" | |
- name: npm build and test | |
run: | | |
npm run clean | |
npm run build | |
- name: Start Keycloak server | |
run: npm run end2end:start-server & | |
- name: Wait for Keycloak server | |
run: .bin/wait-for-server.sh | |
- name: Run end2end tests | |
run: npm run end2end:test | |
env: | |
WEBHOOK_TESTING_TEAMS: ${{ secrets.WEBHOOK_TESTING_TEAMS }} | |
WEBHOOK_TESTING_SLACK: ${{ secrets.WEBHOOK_TESTING_SLACK }} | |
package: | |
name: Build Container Image | |
runs-on: ubuntu-latest | |
needs: | |
- end2end | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
# TODO: Support Node 16+ | |
with: | |
node-version: "16" | |
- name: "Build Package" | |
run: | | |
npm run clean | |
npm run build | |
- name: Buildah Action | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: continuoussecuritytooling/keycloak-reporting-cli | |
tags: "v1 ${{ github.sha }}" | |
containerfiles: | | |
./Dockerfile | |
- name: Push To Docker Hub | |
id: push-to-dockerhub | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build-image.outputs.image }} | |
tags: ${{ steps.build-image.outputs.tags }} | |
registry: registry.hub.docker.com | |
username: continuoussecuritytooling | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' |