build #246
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: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
schedule: | |
# run validation against latest unleash-server image | |
- cron: "30 5 * * 1-5" | |
permissions: | |
packages: read | |
jobs: | |
build: | |
strategy: | |
matrix: | |
image: | |
- "ghcr.io/ivarconr/unleash-enterprise:5.9" | |
- "unleashorg/unleash-server:5.9" | |
- "ghcr.io/ivarconr/unleash-enterprise:5.10" | |
- "unleashorg/unleash-server:5.10" | |
- "ghcr.io/ivarconr/unleash-enterprise:5.11" | |
- "unleashorg/unleash-server:5.11" | |
- "ghcr.io/ivarconr/unleash-enterprise:5.12" | |
- "unleashorg/unleash-server:5.12" | |
- "ghcr.io/ivarconr/unleash-enterprise:6.0" | |
- "unleashorg/unleash-server:6.0" | |
- "ghcr.io/ivarconr/unleash-enterprise:6.1" | |
- "unleashorg/unleash-server:6.1" | |
- "ghcr.io/ivarconr/unleash-enterprise:latest" | |
- "unleashorg/unleash-server:latest" | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.20" | |
- name: Login to ghcr | |
if: contains(matrix.image, 'unleash-enterprise') | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: gastonfournier | |
password: ${{ secrets.GHCR_TOKEN }} | |
- name: Setup enterprise docker image | |
if: contains(matrix.image, 'unleash-enterprise') | |
run: | | |
echo UNLEASH_DOCKER_IMAGE=${{ matrix.image }} >> $GITHUB_ENV | |
echo UNLEASH_ENTERPRISE=true >> $GITHUB_ENV | |
- name: Startup services ${{ matrix.image }} | |
run: docker compose up -d --wait -t 60 | |
- name: Tests ${{ matrix.image }} | |
run: go test -v -cover ./test/... |