Skip to content

Commit

Permalink
Replace Travis CI with Github Actions
Browse files Browse the repository at this point in the history
travis-ci.org is defunct.

fd leak test had to be disabled because of
https://github.com/actions/runner/issues/1188 .
  • Loading branch information
rfjakob committed Jul 6, 2021
1 parent bca302b commit 509df07
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 24 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI

on:
push:
pull_request:
schedule:
- cron: '0 12 * * *' # Every day noon UTC

jobs:
build:
runs-on: ubuntu-latest
steps:

# Looks like Github Actions leaks fds to child processes
# https://github.com/actions/runner/issues/1188
- run: ls -l /proc/self/fd

- uses: actions/checkout@v2
with:
fetch-depth: 0 # Make "git describe" work

- run: sudo apt-get install -qq pandoc cppcheck

- run: make

- run: make test
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
earlyoom - The Early OOM Daemon
===============================

[![Build Status](https://api.travis-ci.org/rfjakob/earlyoom.svg)](https://travis-ci.org/rfjakob/earlyoom)
[![CI](https://github.com/rfjakob/earlyoom/actions/workflows/ci.yml/badge.svg)](https://github.com/rfjakob/earlyoom/actions/workflows/ci.yml)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Latest release](https://img.shields.io/github/release/rfjakob/earlyoom.svg)](https://github.com/rfjakob/earlyoom/releases)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/rfjakob/earlyoom.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/rfjakob/earlyoom/alerts/)
Expand Down
7 changes: 6 additions & 1 deletion testsuite_cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"io/ioutil"
"math"
"os"
"strconv"
"strings"
"testing"
Expand Down Expand Up @@ -177,7 +178,11 @@ func TestCli(t *testing.T) {
pass = false
}
if res.fds > openFdsMax {
t.Fatalf("High number of open file descriptors: %d", res.fds)
if os.Getenv("GITHUB_ACTIONS") == "true" {
t.Log("Ignoring fd leak. Github Actions bug? See https://github.com/actions/runner/issues/1188")
} else {
t.Fatalf("High number of open file descriptors: %d", res.fds)
}
}
if !pass {
const empty = "(empty)"
Expand Down

0 comments on commit 509df07

Please sign in to comment.