Skip to content

Commit

Permalink
github actions: run tests natively on linux/mac since windows can't r…
Browse files Browse the repository at this point in the history
…un linux dockers anyway
  • Loading branch information
neilstephens committed Dec 7, 2024
1 parent c635a04 commit 45fb29f
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 40 deletions.
89 changes: 63 additions & 26 deletions .github/workflows/MiniPlex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,50 +59,47 @@ jobs:
RELEASE_NOTES
3rdPartyLicenses/LICENSE_1_0.txt
- if: ${{ !contains(matrix.os,'windows') }}
- if: ${{ always() && !contains(matrix.os,'windows') }}
name: Start MiniPlex
shell: bash
run: |
${{github.workspace}}/build/MiniPlex -H -p 20000 &
${{github.workspace}}/build/MiniPlex -T -p 20001 -r 172.17.0.2 -t 50000 &
${{github.workspace}}/build/MiniPlex -P -p 20002 -r 172.17.0.2 -t 50000 &
${{github.workspace}}/build/MiniPlex -P -p 20003 -r 172.17.0.2 -t 50000 -B 172.17.0.2 -b 50001 &
${{github.workspace}}/build/MiniPlex -T -p 20001 -r 127.0.0.1 -t 50000 &
${{github.workspace}}/build/MiniPlex -P -p 20002 -r 127.0.0.1 -t 50000 &
${{github.workspace}}/build/MiniPlex -P -p 20003 -r 127.0.0.1 -t 50000 -B 127.0.0.1 -b 50001 &
sleep 1
- if: always() && contains(matrix.os,'macos')
name: Mac ncat
run: |
brew install nmap
- if: contains(matrix.os,'macos')
name: Mac docker
- if: always() && contains(matrix.os,'ubuntu')
name: Linux ncat
run: |
brew install docker colima
brew services start colima
sudo ln -s ~/.docker/run/docker.sock /var/run/docker.sock
apt-get install -y ncat
- if: ${{ !contains(matrix.os,'windows') }}
- if: ${{ always() && !contains(matrix.os,'windows') }}
name: Test Hub Mode
shell: bash
run: |
docker build --build-arg SCRIPT_NAME=Test/HubMode.sh -t miniplex-test -f DockerFiles/Test .
docker run --add-host=host.docker.internal:host-gateway miniplex-test host.docker.internal 20000
Test/HubMode.sh 127.0.0.1 20000
- if: ${{ !contains(matrix.os,'windows') }}
- if: ${{ always() && !contains(matrix.os,'windows') }}
name: Test Trunk Mode
shell: bash
run: |
docker build --build-arg SCRIPT_NAME=Test/TrunkMode.sh -t miniplex-test -f DockerFiles/Test .
docker run --add-host=host.docker.internal:host-gateway miniplex-test 50000 host.docker.internal 20001
Test/TrunkMode.sh 50000 127.0.0.1 20001
- if: ${{ !contains(matrix.os,'windows') }}
- if: ${{ always() && !contains(matrix.os,'windows') }}
name: Test Prune Mode
shell: bash
run: |
docker build --build-arg SCRIPT_NAME=Test/PruneMode.sh -t miniplex-test -f DockerFiles/Test .
docker run --add-host=host.docker.internal:host-gateway miniplex-test 50000 host.docker.internal 20002
Test/PruneMode.sh 50000 127.0.0.1 20002
- if: ${{ !contains(matrix.os,'windows') }}
- if: ${{ always() && !contains(matrix.os,'windows') }}
name: Test Permanent Branches
shell: bash
run: |
docker build --build-arg SCRIPT_NAME=Test/PermanentBranches.sh -t miniplex-test -f DockerFiles/Test .
docker run --add-host=host.docker.internal:host-gateway miniplex-test 50000 50001 host.docker.internal 20003
Test/PermanentBranches.sh 50000 50001 127.0.0.1 20003
- if: ${{ !contains(matrix.os,'windows') }}
- if: ${{ always() && !contains(matrix.os,'windows') }}
name: Stop MiniPlex
run: |
killall MiniPlex || true
Expand Down Expand Up @@ -162,6 +159,46 @@ jobs:
README.md
RELEASE_NOTES
3rdPartyLicenses/LICENSE_1_0.txt
- if: always()
name: Start MiniPlex
shell: bash
run: |
build/MiniPlex -H -p 20000 &
build/MiniPlex -T -p 20001 -r 127.0.0.1 -t 50000 &
build/MiniPlex -P -p 20002 -r 127.0.0.1 -t 50000 &
build/MiniPlex -P -p 20003 -r 127.0.0.1 -t 50000 -B 127.0.0.1 -b 50001 &
sleep 1
- if: always()
name: Linux ncat
run: |
apt-get install -y ncat
- if: always()
name: Test Hub Mode
run: |
Test/HubMode.sh 127.0.0.1 20000
- if: always()
name: Test Trunk Mode
run: |
Test/TrunkMode.sh 50000 127.0.0.1 20001
- if: always()
name: Test Prune Mode
run: |
Test/PruneMode.sh 50000 127.0.0.1 20002
- if: always()
name: Test Permanent Branches
run: |
Test/PermanentBranches.sh 50000 50001 127.0.0.1 20002
- if: always()
name: Stop MiniPlex
run: |
killall MiniPlex || true
deploy-job:
if: always() && contains(github.ref, 'tag')
Expand Down
14 changes: 0 additions & 14 deletions DockerFiles/Test

This file was deleted.

0 comments on commit 45fb29f

Please sign in to comment.