From 2d7769e8bb0d285a9748c24b45cd842e8c0f5a9f Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 25 Jul 2020 16:05:28 -0500 Subject: [PATCH] Squashed commit of the following: commit 86e8eca82a2167bcb5934a0aa062448e6df13e4f Author: Geoff Bourne Date: Sat Jul 25 15:57:36 2020 -0500 ci: Simplified naming of only test compose file commit d88a77f6ea688db7b96b21cda6b6999ea214b7c1 Author: Geoff Bourne Date: Sat Jul 25 15:52:05 2020 -0500 ci: Switched to DockerHub build and test --- .github/workflows/main.yml | 39 ------------------- .github/workflows/pr.yml | 16 -------- ...faults.test.yml => docker-compose.test.yml | 2 +- tests/docker-compose.versioned.test.yml | 21 ---------- tests/test.sh | 20 ---------- 5 files changed, 1 insertion(+), 97 deletions(-) delete mode 100644 .github/workflows/main.yml delete mode 100644 .github/workflows/pr.yml rename tests/docker-compose.defaults.test.yml => docker-compose.test.yml (92%) delete mode 100644 tests/docker-compose.versioned.test.yml delete mode 100755 tests/test.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 6e50f66..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Build - -on: - push: - branches: - - master - tags: - - "[0-9]+.[0-9]+.[0-9]+" - -jobs: -# test: -# runs-on: ubuntu-latest -# -# steps: -# - uses: actions/checkout@v2 -# -# - name: Run tests -# run: | -# tests/test.sh - build: -# needs: [test] - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Build and push Docker images - uses: docker/build-push-action@v1.1.0 - with: - repository: itzg/minecraft-bedrock-server - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASSWORD }} - tag_with_ref: true - tag_with_sha: false - builds_args: BUILDKIT_INLINE_CACHE=1 - always_pull: true - cache_froms: itzg/minecraft-bedrock-server:latest - add_git_labels: true - push: true diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml deleted file mode 100644 index 777eb7e..0000000 --- a/.github/workflows/pr.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Validate PR - -on: - pull_request: - branches: [ master ] - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Run tests - run: | - tests/test.sh diff --git a/tests/docker-compose.defaults.test.yml b/docker-compose.test.yml similarity index 92% rename from tests/docker-compose.defaults.test.yml rename to docker-compose.test.yml index a2417dd..a9dbdb1 100644 --- a/tests/docker-compose.defaults.test.yml +++ b/docker-compose.test.yml @@ -8,7 +8,7 @@ services: command: status-bedrock --host mc --retry-interval 1s --retry-limit 60 mc: build: - context: .. + context: . environment: EULA: "TRUE" diff --git a/tests/docker-compose.versioned.test.yml b/tests/docker-compose.versioned.test.yml deleted file mode 100644 index 7ab35d6..0000000 --- a/tests/docker-compose.versioned.test.yml +++ /dev/null @@ -1,21 +0,0 @@ -version: "3.8" - -services: - sut: - depends_on: - - mc - image: itzg/mc-monitor:0.6.0 - command: status-bedrock --host mc --retry-interval 1s --retry-limit 90 - mc: - build: - context: .. - environment: - EULA: "TRUE" - VERSION: "${BDS_VERSION}" - volumes: - - mc:/data - -volumes: - mc: - external: - name: mc-shared diff --git a/tests/test.sh b/tests/test.sh deleted file mode 100755 index c911e4e..0000000 --- a/tests/test.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -# Args: -# - compose project -# - test description -runTest() { - composeArgs="-f docker-compose.$1.test.yml -p $1" - failed=false - docker-compose ${composeArgs} run sut || failed=true - $failed && docker-compose ${composeArgs} logs - docker-compose ${composeArgs} down -v - if $failed; then - echo "Test failed using compose project $1: $2" - exit 1 - fi -} - -cd $(dirname $0) - -runTest defaults "using defaults"