Update global workflows #86
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: Test | |
env: | |
SCRIPTS_DIR: ./.github/scripts | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
validate-manifests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup yq | |
uses: fluxcd/pkg/actions/yq@main | |
- name: Setup kubeconform | |
uses: fluxcd/pkg/actions/kubeconform@main | |
- name: Setup kustomize | |
uses: fluxcd/pkg/actions/kustomize@main | |
- name: Validate manifests | |
run: $SCRIPTS_DIR/validate-manifests.sh | |
e2e-test: | |
runs-on: ubuntu-latest | |
needs: validate-manifests | |
strategy: | |
matrix: | |
environment: [local] # Add more environments here when needed. Right now only local is supported. | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Flux | |
uses: fluxcd/flux2/action@main | |
- name: Extract branch name | |
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
id: extract_branch | |
- name: Setup Kubernetes | |
uses: AbsaOSS/k3d-action@v2.4.0 | |
with: | |
cluster-name: cluster-ci | |
k3d-version: v5.5.2 | |
args: >- | |
--config=$SCRIPTS_DIR/cluster-config/cluster-ci.yaml | |
- name: Install Flux | |
run: flux install | |
- name: Setup cluster reconciliation | |
run: $SCRIPTS_DIR/e2e-setup-cluster-reconciliation.sh ${{ github.event.repository.html_url }} ${{ steps.extract_branch.outputs.branch }} ${{ matrix.environment }} ${{ github.actor }} ${{ secrets.GITHUB_TOKEN }} | |
- name: Verify cluster reconciliation | |
run: $SCRIPTS_DIR/e2e-verify-cluster-reconciliation.sh | |
- name: Verify helm reconciliation | |
run: $SCRIPTS_DIR/e2e-verify-helm-reconciliation.sh ${{ matrix.environment }} | |
# Run e2e tests for apps here | |
# ... | |
- name: Debug failure | |
if: failure() | |
run: $SCRIPTS_DIR/e2e-debug-failure.sh |