Skip to content

Fix goreleaser action #34

Fix goreleaser action

Fix goreleaser action #34

Workflow file for this run

name: Terraform Acceptance Tests
on:
push:
branches:
- 'feature/**'
pull_request:
paths:
- '.github/workflows/test-acc.yaml'
- '**.go'
permissions:
# Permission for checking out code
contents: read
jobs:
acceptance:
name: Acceptance Tests
runs-on: ubuntu-latest
services:
ipa:
image: freeipa/freeipa-server:fedora-37-4.10.1
options: '--hostname ipa.ipatest.lan --privileged --sysctl net.ipv6.conf.all.disable_ipv6=0 --sysctl net.ipv6.conf.lo.disable_ipv6=0 --cap-add=NET_ADMIN'
ports:
- '80:80'
- '443:443'
env:
container: "docker"
IPA_SERVER_HOSTNAME: "ipa.ipatest.lan"
IPA_SERVER_INSTALL_OPTS: '--no-ntp --ds-password=P@ssword --admin-password=P@ssword --domain=ipatest.lan --realm=IPATEST.LAN --no-forwarders --setup-dns --no-dnssec-validation --allow-zone-overlap --no-reverse --unattended'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.18'
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: '1.3.*'
terraform_wrapper: false
- name: Add ipa container to /etc/hosts
run: |
sudo echo "127.0.0.1 ipa.ipatest.lan" | sudo tee -a /etc/hosts
- name: Run acceptance tests
run: |
docker logs "${{ job.services.ipa.id }}"
echo "Waiting for FreeIPA Server to initialize"
while [ "$(docker logs --tail 1 ${{ job.services.ipa.id }})" != "FreeIPA server configured." ] ; do echo "FreeIPA server not ready. Waiting another 30s." ; sleep 30 ; done
go test -v -cover ./freeipa/
env:
TF_ACC: '1'
FREEIPA_HOST: 'ipa.ipatest.lan'
FREEIPA_USERNAME: 'admin'
FREEIPA_PASSWORD: 'P@ssword'
timeout-minutes: 30