-
Notifications
You must be signed in to change notification settings - Fork 322
83 lines (76 loc) · 3.1 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: CI
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
hatchet:
name: "Hatchet (${{ matrix.stack }})"
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
stack: ["heroku-20", "heroku-22"]
env:
HATCHET_APP_LIMIT: 100
HATCHET_RUN_MULTI: 1
HATCHET_EXPENSIVE_MODE: 1
PARALLEL_SPLIT_TEST_PROCESSES: 6
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_API_USER: ${{ secrets.HEROKU_API_USER }}
HEROKU_DISABLE_AUTOUPDATE: 1
# TODO: Remove once Hatchet supports GitHub Actions natively:
# https://github.com/heroku/hatchet/pull/189
HATCHET_BUILDPACK_BRANCH: ${{ github.head_ref || github.ref_name }}
HATCHET_BUILDPACK_BASE: https://github.com/heroku/heroku-buildpack-scala
# Default stack for all Heroku apps created by Hatchet
DEFAULT_APP_STACK: ${{ matrix.stack }}
steps:
- uses: actions/checkout@v4
- name: Install Ruby and dependencies
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: "2.7"
- name: Hatchet setup
run: bundle exec hatchet ci:setup
- name: Run Hatchet integration tests
run: bundle exec parallel_split_test test/spec/
buildpack-testrunner:
runs-on: ubuntu-22.04
env:
SHUNIT_HOME: /tmp/shunit2-2.1.6
# Note the missing STACK environment variable here. This works since there is a default value in the buildpack
# source. I ported this as-is from the Travis config. Given we're trying to get rid of testrunner entirely,
# it will stay like this. If we, for some reason, decide to keep testrunner, we should look into a fixed STACK env var.
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 8
- name: Download and unpack shunit 2.1.6
run: curl -sSf --retry 3 --retry-connrefused --connect-timeout 5 https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/shunit2/shunit2-2.1.6.tgz | tar xz -C /tmp/
- name: Clone heroku-buildpack-testrunner
run: git clone https://github.com/heroku/heroku-buildpack-testrunner.git /tmp/testrunner
- name: Apply heroku-buildpack-testrunner patches to enforce bash shell
run: |
cd /tmp/testrunner
git apply <<'EOF'
diff --git a/bin/run b/bin/run
index 0d5b790..a0ff25c 100755
--- a/bin/run
+++ b/bin/run
@@ -101,7 +101,7 @@ for bp in ${@}; do
suite_start_time="$(date +%s)"
echo " TEST SUITE: $(basename ${f})"
- ${SHUNIT_HOME?"'SHUNIT_HOME' environment variable must be set"}/src/shunit2 ${f} | indent
+ /bin/bash ${SHUNIT_HOME?"'SHUNIT_HOME' environment variable must be set"}/src/shunit2 ${f} | indent
exit_code=$(max ${exit_code} ${PIPESTATUS[0]})
suite_end_time="$(date +%s)"
EOF
- name: Execute buildpack-testrunner
run: /tmp/testrunner/bin/run .