Skip to content

Commit 92ff584

Browse files
committed
test: add test and build caching
fix: nektos/act isn't the same as the runner fix: another try fix: fix: fix: fix: fix: fix: fix: fix:
1 parent e0b24b4 commit 92ff584

File tree

1 file changed

+40
-3
lines changed

1 file changed

+40
-3
lines changed

.github/workflows/makefile.yml

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Makefile CI
1+
name: build and test
22

33
on:
44
push:
@@ -14,5 +14,42 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v4
1616

17-
- name: make binary
18-
run: make websocketd
17+
- uses: actions/setup-go@v5
18+
with:
19+
go-version-file: go.mod
20+
21+
# - name: build using makefile
22+
# run: make websocketd
23+
24+
- name: build websocketd
25+
run: go build
26+
27+
- name: Archive build artifacts
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: websocketd
31+
path: |
32+
websocketd
33+
./examples/bash/dump-env.sh
34+
35+
36+
test:
37+
needs: build
38+
runs-on: ubuntu-latest
39+
40+
steps:
41+
- name: Download built websocketd
42+
uses: actions/download-artifact@v4
43+
with:
44+
name: websocketd
45+
46+
- name: fix permissions
47+
run: chmod +x ./websocketd && chmod +x ./examples/bash/dump-env.sh
48+
49+
- name: setup client
50+
run: wget https://github.com/vi/websocat/releases/latest/download/websocat.x86_64-unknown-linux-musl && chmod +x websocat.x86_64-unknown-linux-musl
51+
52+
- name: test
53+
run: |
54+
./websocketd --port=8080 ./examples/bash/dump-env.sh &
55+
./websocat.x86_64-unknown-linux-musl -E ws://$(hostname):8080

0 commit comments

Comments
 (0)