Skip to content

Commit

Permalink
test: Add Wnds environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoan-MA committed Jan 3, 2023
1 parent 872db77 commit dadf5d5
Showing 1 changed file with 41 additions and 2 deletions.
43 changes: 41 additions & 2 deletions .github/workflows/test-image-execution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest, macos-latest]
os: [ windows-latest]
runs-on: ${{ matrix.os }}

# steps to perform in job
Expand All @@ -37,8 +37,47 @@ jobs:
colima start
docker --version
- name: Start containers
- name: Setup Windows Env
if: runner.os == 'Windows'
uses: Vampire/setup-wsl@v1
with:
distribution: Ubuntu-22.04

- name: Setup Docker on WSL
if: runner.os == 'Windows'
shell: wsl-bash {0}
run: |
sudo apt-get -y install \
ca-certificates \
curl \
gnupg \
lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-compose
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo iptables -t filter -N DOCKER
dockerd --debug \
--tls=true \
--host tcp://192.168.59.3:2376
sleep 5
docker ps -a
- name: Start containers for Linux / MacOS
if: runner.os != 'Windows'
run: |
docker-compose up -d
sleep 30
- name: Start containers for Windows
if: runner.os == 'Windows'
shell: wsl-bash {0}
run: |
docker ps -a
docker-compose up -d
sleep 30
Expand Down

0 comments on commit dadf5d5

Please sign in to comment.