terraform-provider-docker/.github/workflows/acc-test.yaml
Manuel Vogel c404e0ae51
fix: replace for loops with StateChangeConf (#182)
* fix: create container refresh function
* fix: adapt statefunc delays and timeouts to reflect for loop
* feat: add testaccDockerfile for local development
* chore(ci): bump terraform versions and add 0.15.2
2021-05-11 08:59:40 +02:00

52 lines
1.7 KiB
YAML

name: Acc Tests
on:
push:
branches:
- master
- "release/**"
pull_request:
types: ['opened', 'synchronize']
paths:
- '**.go'
- go.mod
- '.github/workflows/**'
env:
GOPROXY: https://proxy.golang.org,https://gocenter.io,direct
DEBIAN_FRONTEND: noninteractive
DOCKER_CE_VERSION: "5:20.10.5~3-0~ubuntu-focal"
jobs:
acc-test:
runs-on: ubuntu-20.04
strategy:
fail-fast: true
matrix:
terraform_version:
- "0.12.31"
- "0.13.7"
- "0.14.11"
- "0.15.2"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.16'
- run: cat /etc/issue
- run: bash scripts/gogetcookie.sh
# locally: docker run -it ubuntu:20.04 bash (https://ubuntu.pkgs.org/20.04/docker-ce-stable-amd64/)
- run: sudo apt-get update
- run: sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
- run: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- run: sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- run: sudo apt-get update
# list available docker versions: apt-cache policy docker-ce
- run: sudo apt-get -y install docker-ce=${DOCKER_CE_VERSION}
- run: docker version
# Allow local registry to be insecure
- run: sudo sed 's/DOCKER_OPTS="/DOCKER_OPTS="--insecure-registry=127.0.0.1:15000 /g' -i /etc/default/docker
- run: sudo cat /etc/default/docker
- run: sudo service docker restart
- run: make testacc
env:
TF_ACC_TERRAFORM_VERSION: ${{ matrix.terraform_version }}