Skip to content

fix: run old Docker versions on Ubuntu 20.04 #895

fix: run old Docker versions on Ubuntu 20.04

fix: run old Docker versions on Ubuntu 20.04 #895

Workflow file for this run

name: Integration tests
on:
push:
branches:
- main
- staging
- trying
pull_request:
branches:
- main
jobs:
build-test-binary:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Retrieve cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-it-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: x86_64-unknown-linux-musl
- name: Build the test-binary
run: |
cp $(
cargo test \
--features docker-tests \
--test dfw \
--no-run \
--message-format=json \
--target x86_64-unknown-linux-musl \
| jq -r 'select(.profile.test == true) | .executable'
) dfw-docker-test
- name: Store the test-binary as an artifact
uses: actions/upload-artifact@v2
with:
name: dfw-docker-test
path: dfw-docker-test
test-on-docker:
needs:
- build-test-binary
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- dind-image: docker:19.03-dind
runs-on: ubuntu-20.04
- dind-image: docker:18.09-dind
runs-on: ubuntu-20.04
- dind-image: docker:18.06-dind
runs-on: ubuntu-20.04
- dind-image: docker:18.03-dind
runs-on: ubuntu-20.04
- dind-image: docker:17.12-dind
runs-on: ubuntu-20.04
- dind-image: docker:17.09-dind
runs-on: ubuntu-20.04
- dind-image: docker:17.07-dind
runs-on: ubuntu-20.04
- dind-image: docker:17.06-dind
runs-on: ubuntu-20.04
- dind-image: docker:1.13-dind
runs-on: ubuntu-20.04
services:
dind:
image: ${{ matrix.dind-image }}
ports:
- 2375/tcp
env:
DOCKER_TLS_CERTDIR: ""
options: --privileged
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Retrieve the test-binary
uses: actions/download-artifact@v2
with:
name: dfw-docker-test
- name: Ensure Docker is available
run: |
while ! nc -z localhost ${{ job.services.dind.ports[2375] }}; do
sleep 1
done
env DOCKER_HOST="tcp://127.0.0.1:${{ job.services.dind.ports[2375] }}" \
docker info
timeout-minutes: 1
- name: Run the test-binary
env:
RUST_TEST_THREADS: 1
DOCKER_HOST: "http://127.0.0.1:${{ job.services.dind.ports[2375] }}"
run: |
chmod +x ./dfw-docker-test
./dfw-docker-test --nocapture