switch from travis to GitHub actions
This commit is contained in:
parent
8c74716f04
commit
87609f10c7
29
.github/workflows/main.yml
vendored
Normal file
29
.github/workflows/main.yml
vendored
Normal file
@ -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
|
16
.travis.yml
16
.travis.yml
@ -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
|
Loading…
x
Reference in New Issue
Block a user