@marcel91200 / caddy Mirror · read-only / commits / 99dcc10f
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 14, 05:15 UTC

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

Mohammed Al Sahaf committed Jun 12, 2020 at 20:11 UTC 99dcc10f3183e7c4871e54a73de1d403ece183fd
1 file changed +26
.github/workflows/ci.yml
+26
@@ -120,6 +120,32 @@ jobs:
120 # echo "step_test ${{ steps.step_test.outputs.status }}\n"
121 # exit 1
122
123 + s390x-test:
124 + name: test (s390x on IBM Z)
125 + runs-on: ubuntu-latest
126 + steps:
127 + - name: Checkout code into the Go module directory
128 + uses: actions/checkout@v2
129 + - name: Run Tests
130 + run: |
131 + mkdir -p ~/.ssh && echo -e "${SSH_KEY//_/\\n}" > ~/.ssh/id_ecdsa && chmod og-rwx ~/.ssh/id_ecdsa
132 +
133 + # short sha is enough?
134 + short_sha=$(git rev-parse --short HEAD)
135 +
136 + # The environment is fresh, so there's no point in keeping accepting and adding the key.
137 + 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"
138 + 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 ./..."
139 + test_result=$?
140 +
141 + # There's no need leaving the files around
142 + ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null caddy-ci@ci-s390x.caddyserver.com "rm -rf /var/tmp/'$short_sha'"
143 +
144 + echo "Test exit code: $test_result"
145 + exit $test_result
146 + env:
147 + SSH_KEY: ${{ secrets.S390X_SSH_KEY }}
148 +
149 # From https://github.com/reviewdog/action-golangci-lint
150 golangci-lint:
151 name: runner / golangci-lint