forked from gliderlabs/herokuish
-
Notifications
You must be signed in to change notification settings - Fork 0
145 lines (121 loc) · 3.45 KB
/
main.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
---
name: CI
# yamllint disable-line rule:truthy
on:
pull_request:
branches:
- "*"
push:
branches:
- master
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: build.${{ matrix.heroku }}-${{ matrix.buildx }}
runs-on: ubuntu-22.04
strategy:
fail-fast: true
matrix:
buildx:
- "true"
- "false"
heroku:
- 20
- 22
- 24
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.17.8
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
- uses: actions/setup-python@v5
with:
python-version: "3.7.x"
- name: setup env
run: make ci-report
- name: shellcheck
run: make shellcheck
- name: install requirements
run: make deps fpm package_cloud
- name: set up qemu
uses: docker/setup-qemu-action@v3
- name: set up docker buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: inspect builder
run: |
echo "Name: ${{ steps.buildx.outputs.name }}"
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
echo "Status: ${{ steps.buildx.outputs.status }}"
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
- name: build
run: |
if [[ "${{ matrix.buildx }}" == "true" ]]; then
make build/docker/${{ matrix.heroku }} STACK_VERSION=${{ matrix.heroku }}
else
make build build/docker/${{ matrix.heroku }} BUILDX=false STACK_VERSION=${{ matrix.heroku }}
fi
- name: bash tests
run: |
if [[ "${{ matrix.buildx }}" == "false" ]]; then
basht tests/**/tests.sh
fi
- name: upload packages
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.heroku }}-${{ matrix.buildx }}
path: build
unit-tests:
name: unit.heroku-${{ matrix.heroku }}.${{ matrix.buildpack }}
needs: build
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
buildpack:
- buildpack-clojure
- buildpack-go
- buildpack-gradle
- buildpack-java
- buildpack-multi
- buildpack-nodejs
- buildpack-null
- buildpack-php
- buildpack-play
- buildpack-python
- buildpack-ruby
- buildpack-scala
- buildpack-static
heroku:
- 20
- 22
- 24
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.17.8
- name: download packages
uses: actions/download-artifact@v4
with:
name: build-${{ matrix.heroku }}-false
path: build
- name: validate packages
run: |
ls -lah build build/*
- name: install requirements
run: make deps
- name: build docker images
run: make build/docker/${{ matrix.heroku }} BUILDX=false STACK_VERSION=${{ matrix.heroku }}
- name: run buildpack test
run: |
echo "executing ${{ matrix.buildpack }} tests"
basht buildpacks/${{ matrix.buildpack }}/tests/*/test.sh