Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run CI Jobs via Github Actions #304

Merged
merged 18 commits into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CODEOWNERS info: https://help.github.com/en/articles/about-code-owners
# Owners are automatically requested for review for PRs that changes code
# that they own.
* @manishrjain @martinmr @jarifibrahim
* @akon-dey @nosql22 @joshua-goldstein @skrdgraph
27 changes: 27 additions & 0 deletions .github/workflows/ci-ristretto-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: ci-ristretto-lint
on:
push:
branches:
- main
joshua-goldstein marked this conversation as resolved.
Show resolved Hide resolved
pull_request:
branches:
- main
joshua-goldstein marked this conversation as resolved.
Show resolved Hide resolved
schedule:
- cron: "0 * * * *"
jobs:
go-lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golang-lint
env:
# prevent OOM
GOGC: 10
uses: golangci/golangci-lint-action@v2
joshua-goldstein marked this conversation as resolved.
Show resolved Hide resolved
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.36
only-new-issues: true
args: --timeout=10m
skip-go-installation: true
35 changes: 35 additions & 0 deletions .github/workflows/ci-ristretto-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: ci-ristretto-tests
on:
push:
branches:
- main
joshua-goldstein marked this conversation as resolved.
Show resolved Hide resolved
pull_request:
branches:
- main
joshua-goldstein marked this conversation as resolved.
Show resolved Hide resolved
schedule:
- cron: "30 * * * *"
jobs:
ristretto-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get Go Version
run: |
#!/bin/bash
DEFAULT_VERSION="1.17"
GOVERSION=$({ [ -f .go-version ] && cat .go-version; } || echo $DEFAULT_VERSION)
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GOVERSION }}
- name: Run Unit Tests
run: go test -race -covermode atomic -coverprofile=covprofile ./...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need the -race flag here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took that from the previous test.sh script. Probably it is a good idea to keep it around (only downside is tests may take longer).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

- name: Install Goveralls
run: go install github.com/mattn/goveralls@latest
# - name: Send Coverage Results
# env:
# COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: goveralls -coverprofile=covprofile -service=github
# - name: Send Coverage Results
# run: cd t && goveralls -repotoken ${{ secrets.COVERALLSIO_TOKEN }} -coverprofile=coverage.out
joshua-goldstein marked this conversation as resolved.
Show resolved Hide resolved
24 changes: 0 additions & 24 deletions .github/workflows/main.yml

This file was deleted.

1 change: 1 addition & 0 deletions .go-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.17.11
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# Ristretto
[![Go Doc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/dgraph-io/ristretto)
[![ci-ristretto-tests](https://github.com/dgraph-io/ristretto/actions/workflows/ci-ristretto-tests.yml/badge.svg)](https://github.com/dgraph-io/ristretto/actions/workflows/ci-ristretto-tests.yml)
[![ci-ristretto-lint](https://github.com/dgraph-io/ristretto/actions/workflows/ci-ristretto-lint.yml/badge.svg)](https://github.com/dgraph-io/ristretto/actions/workflows/ci-ristretto-lint.yml)
[![Go Report Card](https://img.shields.io/badge/go%20report-A%2B-brightgreen)](https://goreportcard.com/report/github.com/dgraph-io/ristretto)
[![Coverage](https://gocover.io/_badge/github.com/dgraph-io/ristretto)](https://gocover.io/github.com/dgraph-io/ristretto)
![Tests](https://github.com/dgraph-io/ristretto/workflows/tests/badge.svg)

Ristretto is a fast, concurrent cache library built with a focus on performance and correctness.

The motivation to build Ristretto comes from the need for a contention-free
cache in [Dgraph][].

**Use [Discuss Issues](https://discuss.dgraph.io/tags/c/issues/35/ristretto/40) for reporting issues about this repository.**

[Dgraph]: https://github.com/dgraph-io/dgraph

## Features
Expand Down
20 changes: 0 additions & 20 deletions test.sh

This file was deleted.