diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3f07df7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,86 @@ +name: ci + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + schedule: + - cron: '0 10 * * *' + push: + branches: + - 'main' + - 'releases/v*' + tags: + - 'v*' + pull_request: + +jobs: + main: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + compose-version: + - "" + - "latest" + - "v2.32.4" + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Set up Docker Compose + uses: ./ + with: + version: ${{ matrix.compose-version }} + + multi: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Set up Docker Compose 1 + uses: ./ + - + name: Set up Docker Compose 2 + uses: ./ + + standalone: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Uninstall docker cli + run: | + if dpkg -s "docker-ce" >/dev/null 2>&1; then + sudo dpkg -r --force-depends docker-ce-cli docker-compose-plugin + else + sudo apt-get purge -y moby-cli moby-compose + fi + - + name: Set up Docker Compose + uses: ./ + + cache-binary: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + cache: + - true + - false + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Set up Docker Compose + uses: ./ + with: + version: v2.31.0 + cache-binary: ${{ matrix.cache }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..a742597 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: test + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + push: + branches: + - 'main' + - 'releases/v*' + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - + name: Test + uses: docker/bake-action@v6 + with: + targets: test +# - +# name: Upload coverage +# uses: codecov/codecov-action@v5 +# with: +# files: ./coverage/clover.xml +# token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..dd4d921 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,43 @@ +name: validate + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + push: + branches: + - 'main' + - 'releases/v*' + pull_request: + +jobs: + prepare: + runs-on: ubuntu-latest + outputs: + targets: ${{ steps.generate.outputs.targets }} + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: List targets + id: generate + uses: docker/bake-action/subaction/list-targets@v6 + with: + target: validate + + validate: + runs-on: ubuntu-latest + needs: + - prepare + strategy: + fail-fast: false + matrix: + target: ${{ fromJson(needs.prepare.outputs.targets) }} + steps: + - + name: Validate + uses: docker/bake-action@v6 + with: + targets: ${{ matrix.target }}