diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000000..44bb2d0fa6 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,62 @@ +on: [push, pull_request] +name: tests + +jobs: + #linux: + #strategy: + #matrix: + #go-version: [1.x, 1.13.x] + #platform: [ubuntu-latest] + #runs-on: ${{ matrix.platform }} + + #steps: + #- name: Install apt packages + #run: | + #sudo apt-get install -qq pkg-config fuse build-essential libsqlite3-dev + #sudo modprobe fuse + #sudo chmod 666 /dev/fuse + #sudo chown root:$(id -g) /etc/fuse.conf + + #- uses: actions/checkout@v2 + #- uses: actions/setup-go@v2 + #with: + #go-version: ${{ matrix.go-version }} + + ## TODO: use actions/cache. Right now, it causes conflicts with devcam + + ## devcam expects code in GOPATH/src/perkeep.org and to be able to put build + ## artifacts in GOPATH/pkg + #- name: Setup GOPATH + #run: | + #sudo mkdir -p $(go env GOPATH)/src $(go env GOPATH)/pkg + #sudo chmod -R g+w $(go env GOPATH) + #sudo chown -R root:$(id -g) $(go env GOPATH) + #sudo ln -s `pwd` $(go env GOPATH)/src/perkeep.org + + #- name: Build and test + #run: | + #go run make.go -v=true -sqlite=true + #$(go env GOPATH)/bin/devcam test -sqlite=true + + windows: + strategy: + matrix: + go-version: [1.13.x] + platform: [windows-latest] + runs-on: ${{ matrix.platform }} + + steps: + - uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - uses: actions/checkout@v2 + + ## devcam expects code in GOPATH/src/perkeep.org + - name: Setup GOPATH + run: | + New-Item -ItemType SymbolicLink -Path "$(go env GOPATH)/src/perkeep.org" -Target "$(pwd)" + + - name: Build and test + run: | + go run make.go + devcam test