summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorMohammed Al Sahaf <msaa1990@gmail.com>2020-06-12 20:11:46 +0300
committerGitHub <noreply@github.com>2020-06-12 17:11:46 +0000
commit99dcc10f3183e7c4871e54a73de1d403ece183fd (patch)
treeea52ac165f5a5d52949be4008b29889f7c842bec /.github/workflows
parentfa4cdde7d8195f2e1ec5c937f00cbf9ce0d6537b (diff)
ci: add CI on s390x (#3463)
* ci: lay out foundation for s390x tests * ci: uncomment the s390x test script & replace placeholders with real values * ci: amend the s390x test job name to be more consistent with others
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yml26
1 files changed, 26 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c096fbd..e7506fd 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -120,6 +120,32 @@ jobs:
# echo "step_test ${{ steps.step_test.outputs.status }}\n"
# exit 1
+ s390x-test:
+ name: test (s390x on IBM Z)
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code into the Go module directory
+ uses: actions/checkout@v2
+ - name: Run Tests
+ run: |
+ mkdir -p ~/.ssh && echo -e "${SSH_KEY//_/\\n}" > ~/.ssh/id_ecdsa && chmod og-rwx ~/.ssh/id_ecdsa
+
+ # short sha is enough?
+ short_sha=$(git rev-parse --short HEAD)
+
+ # The environment is fresh, so there's no point in keeping accepting and adding the key.
+ rsync -arz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress --delete --exclude '.git' . caddy-ci@ci-s390x.caddyserver.com:/var/tmp/"$short_sha"
+ ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -t caddy-ci@ci-s390x.caddyserver.com "cd /var/tmp/$short_sha; CGO_ENABLED=0 /usr/local/go/bin/go test -v ./..."
+ test_result=$?
+
+ # There's no need leaving the files around
+ ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null caddy-ci@ci-s390x.caddyserver.com "rm -rf /var/tmp/'$short_sha'"
+
+ echo "Test exit code: $test_result"
+ exit $test_result
+ env:
+ SSH_KEY: ${{ secrets.S390X_SSH_KEY }}
+
# From https://github.com/reviewdog/action-golangci-lint
golangci-lint:
name: runner / golangci-lint