mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-01-11 13:23:09 +01:00
Rework the e2e test to expect a working connection to a cluster when they start. Developers can create their own clusters and run the tests. Removed the code used to start kind clusters within the e2e tests. Reworked the Taskfile to define two environments where the tests can run: 1. An ephemeral one running within Dagger, using the k3s module, to be used by the CI. 2. A persistent one created with Kind, requiring the kind binary, to be used for development and debugging when the ephemeral cluster is not enough. Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com> Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com> Co-authored-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
63 lines
1.9 KiB
YAML
63 lines
1.9 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Cleanup Disk
|
|
uses: jlumbroso/free-disk-space@v1.3.1
|
|
with:
|
|
android: true
|
|
dotnet: true
|
|
haskell: true
|
|
tool-cache: true
|
|
large-packages: false
|
|
swap-storage: false
|
|
- name: Cleanup docker cache
|
|
run: |
|
|
echo "-------------Disk info before cleanup----------------"
|
|
df -h
|
|
echo "-----------------------------------------------------"
|
|
docker system prune -a -f
|
|
echo "-------------Disk info after cleanup----------------"
|
|
df -h
|
|
echo "-----------------------------------------------------"
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
# We need the full history for the commitlint task
|
|
with:
|
|
fetch-depth: 0
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- name: Install Task
|
|
uses: arduino/setup-task@v2
|
|
- name: Install Dagger
|
|
env:
|
|
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver
|
|
DAGGER_VERSION: 0.15.1
|
|
run: |
|
|
curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh
|
|
- name: Run CI task
|
|
run: |
|
|
task ci
|
|
- name: Write manifest
|
|
run: |
|
|
task manifest
|
|
- name: Publish images
|
|
if: |
|
|
github.event_name == 'workflow_dispatch' ||
|
|
github.event.pull_request.head.repo.full_name == github.repository
|
|
env:
|
|
REGISTRY_USER: ${{ github.actor }}
|
|
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
task publish
|
|
- name: Attach manifest to workflow run
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: manifest.yaml
|
|
path: ./manifest.yaml
|