Skip to content

Commit 4a6db8e

Browse files
committed
WIP
1 parent 51bbdc6 commit 4a6db8e

File tree

2 files changed

+51
-6
lines changed

2 files changed

+51
-6
lines changed

.github/workflows/cicd.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@ concurrency:
2222
jobs:
2323
build:
2424
uses: ./.github/workflows/build.yml
25-
# test:
26-
# needs: build
27-
# if: needs.build.result == 'success'
28-
# steps:
29-
# - name: Test
30-
# uses: ./.github/workflows/test.yml
25+
test:
26+
needs: build
27+
if: needs.build.result == 'success'
28+
uses: ./.github/workflows/test.yml
3129
# deploy:
3230
# needs: test
3331
# if: needs.test.result == 'success'

.github/workflows/test.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Test
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
id-token: read
8+
9+
jobs:
10+
test:
11+
name: Test
12+
runs-on: ubuntu-latest
13+
if: ! contains(github.event.pull_request.labels.*.name, 'skip-tests')
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Download ActivityPub image
19+
uses: actions/download-artifact@v4
20+
with:
21+
name: activitypub-amd64.tar
22+
path: /tmp
23+
github-token: ${{ secrets.GITHUB_TOKEN }}
24+
run-id: ${{ github.event.workflow_run.id }}
25+
26+
- name: Download Migrations image
27+
uses: actions/download-artifact@v4
28+
with:
29+
name: activitypub-migrations-amd64.tar
30+
path: /tmp
31+
github-token: ${{ secrets.GITHUB_TOKEN }}
32+
run-id: ${{ github.event.workflow_run.id }}
33+
34+
- name: Load Docker images
35+
run: |
36+
docker load < /tmp/activitypub-amd64.tar
37+
docker load < /tmp/migrations-amd64.tar
38+
39+
- name: Run Tests
40+
run: yarn test
41+
42+
- uses: tryghost/actions/actions/slack-build@main
43+
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
44+
with:
45+
status: ${{ job.status }}
46+
env:
47+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)