| name: Verify Container Builder |
| |
| on: |
| pull_request: |
| types: [opened, reopened, edited, synchronize] |
| branches: |
| - main |
| paths: |
| - 'container-builder/**' |
| - '.github/workflows/check-container-builder.yml' |
| |
| env: |
| REGISTRY_STORAGE_DELETE_ENABLED : true |
| |
| jobs: |
| unit-tests: |
| concurrency: |
| group: kogito_serverless_operator_pr-unit-${{ github.head_ref }} |
| cancel-in-progress: true |
| timeout-minutes: 120 |
| name: Unit Tests |
| runs-on: ubuntu-latest |
| steps: |
| - name: Install package |
| run: | |
| sudo apt-get update &&\ |
| sudo apt-get -y install --no-install-recommends \ |
| btrfs-progs \ |
| libgpgme-dev \ |
| libbtrfs-dev \ |
| libdevmapper-dev |
| - name: Setup golang |
| uses: actions/setup-go@v2 |
| with: |
| go-version: 1.21 |
| - name: Checkout code |
| uses: actions/checkout@v2 |
| with: |
| fetch-depth: 0 |
| - run: | |
| cd container-builder |
| make test |
| |
| integration-tests: |
| needs: unit-tests |
| strategy: |
| matrix: |
| container-engine: |
| - docker |
| - kaniko-docker |
| fail-fast: false |
| concurrency: |
| group: kogito_serverless_operator_pr-integration-${{ matrix.container-engine }}-${{ github.head_ref }} |
| cancel-in-progress: true |
| timeout-minutes: 120 |
| name: Integration tests (${{ matrix.container-engine }}) |
| runs-on: ubuntu-latest |
| steps: |
| - name: Install packages |
| run: | |
| sudo apt-get update &&\ |
| sudo apt-get -y install --no-install-recommends \ |
| libgpgme-dev \ |
| libbtrfs-dev \ |
| libdevmapper-dev |
| - name: Setup golang |
| uses: actions/setup-go@v2 |
| with: |
| go-version: 1.21 |
| - name: Checkout code |
| uses: actions/checkout@v2 |
| with: |
| fetch-depth: 0 |
| - name: Run integration tests |
| run: | |
| cd container-builder |
| make ${{ matrix.container-engine }}-integration-test |