Skip to content

Commit

Permalink
test: add test and build caching
Browse files Browse the repository at this point in the history
fix: nektos/act isn't the same as the runner

fix: another try

fix:

fix:

fix:

fix:

fix:

fix:

fix:

fix:
  • Loading branch information
barakplasma committed Jun 10, 2024
1 parent e0b24b4 commit 92ff584
Showing 1 changed file with 40 additions and 3 deletions.
43 changes: 40 additions & 3 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Makefile CI
name: build and test

on:
push:
Expand All @@ -14,5 +14,42 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: make binary
run: make websocketd
- uses: actions/setup-go@v5
with:
go-version-file: go.mod

# - name: build using makefile
# run: make websocketd

- name: build websocketd
run: go build

- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: websocketd
path: |
websocketd
./examples/bash/dump-env.sh
test:
needs: build
runs-on: ubuntu-latest

steps:
- name: Download built websocketd
uses: actions/download-artifact@v4
with:
name: websocketd

- name: fix permissions
run: chmod +x ./websocketd && chmod +x ./examples/bash/dump-env.sh

- name: setup client
run: wget https://github.com/vi/websocat/releases/latest/download/websocat.x86_64-unknown-linux-musl && chmod +x websocat.x86_64-unknown-linux-musl

- name: test
run: |
./websocketd --port=8080 ./examples/bash/dump-env.sh &
./websocat.x86_64-unknown-linux-musl -E ws://$(hostname):8080

0 comments on commit 92ff584

Please sign in to comment.