From f2e7add71bf7d7fdc0d8d8060171e41c238e166a Mon Sep 17 00:00:00 2001 From: Will Norris Date: Thu, 17 Sep 2020 15:44:58 -0700 Subject: [PATCH] Ci: move continuous integration tests to GitHub Actions And remove the Travis CI ones. --- .appveyor.yml | 12 ----------- .github/workflows/tests-linux.yml | 32 +++++++++++++++++++++++++++++ .github/workflows/tests-windows.yml | 32 +++++++++++++++++++++++++++++ .travis.yml | 21 ------------------- README.md | 8 ++------ 5 files changed, 66 insertions(+), 39 deletions(-) delete mode 100644 .appveyor.yml create mode 100644 .github/workflows/tests-linux.yml create mode 100644 .github/workflows/tests-windows.yml delete mode 100644 .travis.yml diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 3b5e6e0ea..000000000 --- a/.appveyor.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: '{branch}-{build}' -skip_tags: true -image: Visual Studio 2017 -clone_folder: c:\gopath\src\perkeep.org -environment: - GOPATH: c:\gopath - PATH: c:\gopath\bin;c:\go\bin;%PATH% - CGO_ENABLED: 0 -build_script: -- cmd: go run make.go -test_script: -- cmd: devcam test diff --git a/.github/workflows/tests-linux.yml b/.github/workflows/tests-linux.yml new file mode 100644 index 000000000..813aa2b1f --- /dev/null +++ b/.github/workflows/tests-linux.yml @@ -0,0 +1,32 @@ +on: [push, pull_request] +name: "tests/linux" + +jobs: + test: + strategy: + matrix: + go-version: [1.x, 1.13.x] + platform: [ubuntu-latest] + runs-on: ${{ matrix.platform }} + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ runner.os }}-go- + + - name: Symlink source into GOPATH for devcam + run: | + mkdir $(go env GOPATH)/src + ln -s $(pwd) $(go env GOPATH)/src/perkeep.org + + - name: Build and test + run: | + go run make.go -v=true -sqlite=true + devcam test -sqlite=true diff --git a/.github/workflows/tests-windows.yml b/.github/workflows/tests-windows.yml new file mode 100644 index 000000000..0a6a3b924 --- /dev/null +++ b/.github/workflows/tests-windows.yml @@ -0,0 +1,32 @@ +on: [push, pull_request] +name: "tests/windows" + +jobs: + test: + strategy: + matrix: + go-version: [1.13.x] + platform: [windows-latest] + runs-on: ${{ matrix.platform }} + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ runner.os }}-go- + + - name: Symlink source into GOPATH for devcam + run: | + mkdir "$(go env GOPATH)/src" + New-Item -ItemType SymbolicLink -Path "$(go env GOPATH)/src/perkeep.org" -Target "$(pwd)" + + - name: Build and test + run: | + go run make.go -v + devcam test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c4d737d2a..000000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -sudo: required -dist: trusty -go_import_path: perkeep.org -language: go -go: - - "1.13.x" -before_install: - - sudo apt-get install -qq pkg-config fuse build-essential - - sudo modprobe fuse - - sudo chmod 666 /dev/fuse - - sudo chown root:$USER /etc/fuse.conf -install: go run make.go -v=true -sqlite=true -script: ${GOPATH}/bin/devcam test -sqlite=true - -notifications: - webhooks: - urls: - - "https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MGxpbmRuZXIlM0FtYXRyaXgub3JnLyUyMW5yT1prcEV0UG1WeEFnaGxTSCUzQW1hdHJpeC5vcmc" - on_success: change # always|never|change - on_failure: always - on_start: never diff --git a/README.md b/README.md index 7563c2954..e88207a9d 100644 --- a/README.md +++ b/README.md @@ -20,12 +20,8 @@ ### Continuous Integration - - - - - -
Linux: Windows:
+[![Linux Test Status](https://github.com/perkeep/perkeep/workflows/tests/linux/badge.svg)](https://github.com/perkeep/perkeep/actions?query=workflow:tests/linux) +[![Windows Test Status](https://github.com/perkeep/perkeep/workflows/tests/windows/badge.svg)](https://github.com/perkeep/perkeep/actions?query=workflow:tests/windows) ### Code of Conduct