Skip to content

Commit

Permalink
Move testing pipeline to github actions.
Browse files Browse the repository at this point in the history
Since travis cannot stop sucking.
  • Loading branch information
hsanjuan committed Oct 20, 2021
1 parent af9313d commit 066b1f4
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 53 deletions.
126 changes: 126 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: Tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master, dependency-upgrades ]

env:
GO: 1.16

jobs:
tests-all:
name: "All modules + Coverage"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO }}

- name: "Tests"
run: go test -v -timeout 15m -coverprofile=coverage.txt -covermode=atomic ./...

- name: "Coverage"
run: bash <(curl -s https://codecov.io/bash)

tests-raft:
name: "Using Raft"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO }}

- name: "Tests"
run: go test -v -timeout 15m -failfast -consensus raft .

tests-leveldb:
name: "Using LevelDB"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO }}

- name: "Tests"
run: go test -v -timeout 15m -failfast -datastore leveldb .

tests-check:
name: "Build and syntax checks"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO }}

- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest

- name: Check
run: make check

- name: Build binaries
run: make build

tests-docker:
name: "Docker and Compose build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Docker builds
run: make docker

- name: Docker compose
run: make docker-compose

sharness:
name: Sharness
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO }}

- name: Apt-get update
run: sudo apt-get update

- name: Install jq and curl
run: sudo apt-get install -y jq curl

- name: Make install
run: make install

- name: Pull go-ipfs
run: docker pull ipfs/go-ipfs

- name: Sharness
run: make test_sharness
53 changes: 0 additions & 53 deletions .travis.yml

This file was deleted.

0 comments on commit 066b1f4

Please sign in to comment.