29
29
with :
30
30
repository : turbot/pipe-fittings
31
31
path : pipe-fittings
32
- ref : tp
32
+ ref : tp-pragma
33
33
34
34
- name : Checkout Tailpipe plugin SDK repository
35
35
uses : actions/checkout@v4
@@ -82,121 +82,90 @@ jobs:
82
82
if-no-files-found : error
83
83
84
84
# TODO - Update the acceptance test job with the correct test suite
85
- # acceptance_test:
86
- # name: Test
87
- # needs: goreleaser
88
- # strategy:
89
- # fail-fast: false
90
- # matrix:
91
- # platform: [ubuntu-latest]
92
- # test_block:
93
- # - "check"
94
- # - "resource_show_outputs"
95
- # - "dashboard"
96
- # - "backend"
97
- # - "mod"
98
- # - "mod_install"
99
- # - "sp_files"
100
- # - "var_resolution"
101
- # - "params_and_args"
102
- # - "snapshot"
103
- # - "dashboard_parsing_validation"
104
- # - "database_precedence"
105
- # runs-on: ${{ matrix.platform }}
106
- # steps:
107
- # - name: Checkout
108
- # uses: actions/checkout@v4
109
- # with:
110
- # submodules: true
111
- # path: powerpipe
112
- # ref: ${{ github.event.ref }}
113
-
114
- # - uses: actions/setup-go@v5
115
- # with:
116
- # go-version: 1.22
117
- # cache: false
118
-
119
- # - name: Prepare for downloads
120
- # id: prepare-for-downloads
121
- # run: |
122
- # mkdir ~/artifacts
85
+ acceptance_test :
86
+ name : Test
87
+ needs : goreleaser
88
+ strategy :
89
+ fail-fast : false
90
+ matrix :
91
+ platform : [ubuntu-latest]
92
+ test_block :
93
+ - " all_column_types"
94
+ - " from_and_to"
95
+ runs-on : ${{ matrix.platform }}
96
+ steps :
97
+ - name : Checkout
98
+ uses : actions/checkout@v4
99
+ with :
100
+ submodules : true
101
+ path : tailpipe
102
+ ref : ${{ github.event.ref }}
103
+
104
+ - uses : actions/setup-go@v5
105
+ with :
106
+ go-version : 1.22
107
+ cache : false
108
+
109
+ - name : Prepare for downloads
110
+ id : prepare-for-downloads
111
+ run : |
112
+ mkdir ~/artifacts
123
113
124
- # - name: Download Linux Build Artifacts
125
- # uses: actions/download-artifact@v3
126
- # if: ${{ matrix.platform == 'ubuntu-latest' }}
127
- # with:
128
- # name: build-artifact-linux
129
- # path: ~/artifacts
130
-
131
- # - name: Download Darwin Build Artifacts
132
- # uses: actions/download-artifact@v3
133
- # if: ${{ matrix.platform == 'macos-latest' }}
134
- # with:
135
- # name: build-artifact-darwin
136
- # path: ~/artifacts
137
-
138
- # - name: Extract Darwin Artifacts and Install Binary
139
- # if: ${{ matrix.platform == 'macos-latest' }}
140
- # run: |
141
- # mkdir ~/build
142
- # tar -xf ~/artifacts/darwin.tar.gz -C ~/build
143
-
144
- # - name: Extract Ubuntu Artifacts and Install Binary
145
- # if: ${{ matrix.platform == 'ubuntu-latest' }}
146
- # run: |
147
- # mkdir ~/build
148
- # tar -xf ~/artifacts/linux.tar.gz -C ~/build
149
-
150
- # - name: Install Steampipe(Darwin)
151
- # if: ${{ matrix.platform == 'macos-latest' }}
152
- # run: |
153
- # brew install turbot/tap/steampipe
154
- # steampipe -v
155
-
156
- # - name: Install Steampipe(Linux)
157
- # if: ${{ matrix.platform == 'ubuntu-latest' }}
158
- # run: |
159
- # sudo /bin/sh -c "$(curl -fsSL https://steampipe.io/install/steampipe.sh)"
160
- # steampipe -v
114
+ - name : Download Linux Build Artifacts
115
+ uses : actions/download-artifact@v3
116
+ if : ${{ matrix.platform == 'ubuntu-latest' }}
117
+ with :
118
+ name : build-artifact-linux
119
+ path : ~/artifacts
120
+
121
+ - name : Extract Ubuntu Artifacts and Install Binary
122
+ if : ${{ matrix.platform == 'ubuntu-latest' }}
123
+ run : |
124
+ mkdir ~/build
125
+ tar -xf ~/artifacts/linux.tar.gz -C ~/build
161
126
162
- # - name: Set PATH
163
- # run: |
164
- # echo "PATH=$PATH:$HOME/build:$GTIHUB_WORKSPACE/powerpipe/tests/acceptance/lib/bats-core/libexec" >> $GITHUB_ENV
165
-
166
- # - name: Go install jd
167
- # run: |
168
- # go install github.com/josephburnett/jd@latest
169
-
170
- # - name: Start steamipipe service
171
- # run: |
172
- # steampipe service start
173
-
174
- # - name: Run Test Suite
175
- # id: run-test-suite
176
- # timeout-minutes: 15
177
- # continue-on-error: true
178
- # run: |
179
- # chmod +x $GITHUB_WORKSPACE/powerpipe/tests/acceptance/run.sh
180
- # $GITHUB_WORKSPACE/powerpipe/tests/acceptance/run.sh ${{ matrix.test_block }}.bats
181
- # echo "exit_code=$(echo $?)" >> $GITHUB_OUTPUT
182
- # echo ">> here"
183
-
184
- # # This job checks whether the test suite has passed or not.
185
- # # Since the exit_code is set only when the bats test suite pass,
186
- # # we have added the if-conditional block
187
- # - name: Check Test Passed/Failed
188
- # if: ${{ success() }}
189
- # continue-on-error: false
190
- # run: |
191
- # if [ ${{ steps.run-test-suite.outputs.exit_code }} -eq 0 ]; then
192
- # exit 0
193
- # else
194
- # exit 1
195
- # fi
196
-
197
- # - name: Stop steampipe service
198
- # run: |
199
- # steampipe service stop
127
+ - name : Set PATH
128
+ run : |
129
+ echo "PATH=$PATH:$HOME/build:$GTIHUB_WORKSPACE/tailpipe/tests/acceptance/lib/bats-core/libexec" >> $GITHUB_ENV
130
+
131
+ - name : Go install jd
132
+ run : |
133
+ go install github.com/josephburnett/jd@latest
134
+
135
+ # TODO remove this step once tailpipe and its plugins are public
136
+ - name : Log in to the Container registry
137
+ uses : docker/login-action@v2
138
+ with :
139
+ registry : ghcr.io
140
+ username : ${{ secrets.GH_USERNAME }}
141
+ password : ${{ secrets.GH_PAT }}
142
+
143
+ - name : Install Tailpipe and plugins
144
+ run : |
145
+ tailpipe plugin install chaos
146
+
147
+ - name : Run Test Suite
148
+ id : run-test-suite
149
+ timeout-minutes : 15
150
+ continue-on-error : true
151
+ run : |
152
+ chmod +x $GITHUB_WORKSPACE/tailpipe/tests/acceptance/run.sh
153
+ $GITHUB_WORKSPACE/tailpipe/tests/acceptance/run.sh ${{ matrix.test_block }}.bats
154
+ echo "exit_code=$(echo $?)" >> $GITHUB_OUTPUT
155
+ echo ">> here"
156
+
157
+ # This job checks whether the test suite has passed or not.
158
+ # Since the exit_code is set only when the bats test suite pass,
159
+ # we have added the if-conditional block
160
+ - name : Check Test Passed/Failed
161
+ if : ${{ success() }}
162
+ continue-on-error : false
163
+ run : |
164
+ if [ ${{ steps.run-test-suite.outputs.exit_code }} -eq 0 ]; then
165
+ exit 0
166
+ else
167
+ exit 1
168
+ fi
200
169
201
170
cleanup :
202
171
# let's clean up the artifacts.
@@ -205,7 +174,7 @@ jobs:
205
174
# refer:
206
175
# https://docs.github.com/en/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts#downloading-and-deleting-artifacts-after-a-workflow-run-is-complete
207
176
name : Clean Up Artifacts
208
- needs : goreleaser
177
+ needs : acceptance_test
209
178
# if: ${{ needs.acceptance_test.result == 'success' }}
210
179
runs-on : ubuntu-latest
211
180
steps :
0 commit comments