Skip to content

Commit

Permalink
Use Github actions for CI
Browse files Browse the repository at this point in the history
travis-ci.org switched to travis-ci.com and we wanted to switch to
Github Actions anyway.
  • Loading branch information
martin-sucha committed Feb 3, 2022
1 parent d73e6b1 commit 7e458d1
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 56 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/cache@v2
id: gomod-cache
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.mod') }}
restore-keys: |
${{ runner.os }}-go-
- run: go vet
- name: Run unit tests
run: go test -tags unit -race
integration-cassandra:
name: Integration Tests with Cassandra
runs-on: ubuntu-latest
strategy:
matrix:
cassandra_version: [3.0.24, 3.11.10, 4.0-rc1]
auth: ["false"]
compressor: ["snappy"]
include:
- cassandra_version: 3.11.10
auth: "true"
compressor: "snappy"
- cassandra_version: 3.11.10
auth: "false"
compressor: "lz4"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/cache@v2
id: gomod-cache
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.mod') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/cache@v2
id: ccm-cache
with:
path: ~/.ccm/repository
key: ${{ runner.os }}-ccm-${{ matrix.cassandra_version }}
restore-keys: |
${{ runner.os }}-ccm-
- run: ./install_test_deps.sh
- run: PATH=$PATH:$HOME/.local/bin bash integration.sh "${{ matrix.cassandra_version }}" "${{ matrix.auth }}" "${{ matrix.compressor }}"
56 changes: 0 additions & 56 deletions .travis.yml

This file was deleted.

0 comments on commit 7e458d1

Please sign in to comment.