Skip to content

Commit

Permalink
add workflow that guarantees Tinygo build
Browse files Browse the repository at this point in the history
This workflow guarantees that at least these packages build under Tinygo
x86_64:

- mvdan.cc/sh/v3/expand
- mvdan.cc/sh/v3/syntax
- mvdan.cc/sh/v3/interp
  • Loading branch information
diamondburned committed May 28, 2024
1 parent 70b3972 commit 4db1663
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,30 @@ jobs:
- name: Test as root, without cgo, and with busybox
run: docker run -v="$PWD:/pwd" -w=/pwd -e=CGO_ENABLED=0 golang:1.22.0-alpine go test ./...

test-tinygo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Tinygo
uses: acifani/setup-tinygo@v2

- name: Create temporary main package
run: |
cat<<EOF > main.go
package main
import (
_ "mvdan.cc/sh/v3/expand"
_ "mvdan.cc/sh/v3/interp"
_ "mvdan.cc/sh/v3/syntax"
)
func main() {}
EOF
- name: Build with Tinygo
run: tinygo build -o /dev/null

docker:
name: Build and test Docker images
# Only deploy if previous stages pass.
Expand Down

0 comments on commit 4db1663

Please sign in to comment.