diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..454e095 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,29 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + format: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Ensure all files were formatted as per gofmt + run: | + gofmt -l $(find . -name '*.go') >/dev/null + + - name: run tests + run: go test ./... + + - name: install gokr-packer + run: go get -u github.com/gokrazy/tools/cmd/gokr-packer + + - name: generate gokrazy disk image + run: | + export PATH=$PATH:$(go env GOPATH)/bin + gokr-packer -overwrite=full.img -target_storage_bytes=1610612736 github.com/gokrazy/hello diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c0f6718..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Use the (faster) container-based infrastructure, see also -# http://docs.travis-ci.com/user/workers/container-based-infrastructure/ -sudo: false - -language: go -go: - - 1.14 - -script: - # Check whether files are syntactically correct. - - "gofmt -l $(find . -name '*.go' | tr '\\n' ' ') >/dev/null" - # Check whether files were not gofmt'ed. - - gosrc=$(find . -name '*.go' | tr '\\n' ' '); [ $(gofmt -l $gosrc 2>&- | wc -l) -eq 0 ] || (echo 'gofmt was not run on these files:'; gofmt -l $gosrc 2>&-; false) - - go test ./... - - go get -u github.com/gokrazy/tools/cmd/gokr-packer - - gokr-packer -overwrite=full.img -target_storage_bytes=1610612736 github.com/gokrazy/hello