Skip to content

Commit

Permalink
Merge pull request #56 from yast/github_actions
Browse files Browse the repository at this point in the history
CI: Move from Travis to GitHub Actions
  • Loading branch information
lslezak committed Jan 6, 2021
2 parents 2d1758a + e9f4711 commit 513bb24
Show file tree
Hide file tree
Showing 8 changed files with 132 additions and 24 deletions.
89 changes: 89 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,89 @@

# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions

name: CI

on: [push, pull_request]

jobs:
Tests:
runs-on: ubuntu-latest
container: registry.opensuse.org/yast/head/containers/yast-ruby:latest

steps:

- name: Git Checkout
uses: actions/checkout@v2

# just for easier debugging...
- name: Inspect Installed Packages
run: rpm -qa | sort

- name: Unit Tests
run: rake test:unit
# enable code coverage reporting
env:
COVERAGE: 1

# send the coverage report to coveralls.io
- name: Coveralls Report
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

# FIXME: Rubocop is not used here...
# Rubocop:
# runs-on: ubuntu-latest
# container: registry.opensuse.org/yast/head/containers/yast-ruby:latest

# steps:

# - name: Git Checkout
# uses: actions/checkout@v2

# - name: Rubocop
# run: rake check:rubocop

Package:
runs-on: ubuntu-latest
container: registry.opensuse.org/yast/head/containers/yast-ruby:latest

steps:

- name: Git Checkout
uses: actions/checkout@v2

- name: Package Build
run: yast-ci-ruby -o package

Yardoc:
runs-on: ubuntu-latest
container: registry.opensuse.org/yast/head/containers/yast-ruby:latest

steps:

- name: Git Checkout
uses: actions/checkout@v2

- name: Yardoc
run: rake check:doc

# downloading the Docker image takes some time so bundling several fast
# checks into one job avoids that overhead
Checks:
runs-on: ubuntu-latest
container: registry.opensuse.org/yast/head/containers/yast-ruby:latest

steps:

- name: Git Checkout
uses: actions/checkout@v2

- name: Perl Syntax
run: yast-ci-ruby -o perl_syntax

- name: POT Check
run: rake check:pot

- name: Check Available Apache Packages
run: ./ci_package_check.sh
22 changes: 22 additions & 0 deletions .github/workflows/packages.yml
@@ -0,0 +1,22 @@

# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions

name: Available_Packages

on:
schedule:
# once a week (every Monday at 3AM)
- cron: "0 3 * * 1"

jobs:
Checks:
runs-on: ubuntu-latest
container: registry.opensuse.org/yast/head/containers/yast-ruby:latest

steps:

- name: Git Checkout
uses: actions/checkout@v2

- name: Check Available Apache Packages
run: ./ci_package_check.sh
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

3 changes: 0 additions & 3 deletions Dockerfile

This file was deleted.

10 changes: 7 additions & 3 deletions README.md
@@ -1,5 +1,9 @@
# YaST - The HTTP Server Configuration Module #

[![Travis Build](https://travis-ci.org/yast/yast-http-server.svg?branch=master)](https://travis-ci.org/yast/yast-http-server)
[![Jenkins Build](http://img.shields.io/jenkins/s/https/ci.opensuse.org/yast-http-server-master.svg)](https://ci.opensuse.org/view/Yast/job/yast-http-server-master/)

[![Workflow Status](https://github.com/yast/yast-http-server/workflows/CI/badge.svg?branch=master)](
https://github.com/yast/yast-http-server/actions?query=branch%3Amaster)
[![Package Status](https://github.com/yast/yast-http-server/workflows/Available_Packages/badge.svg?branch=master)](
https://github.com/yast/yast-http-server/actions?query=branch%3Amaster)
[![Jenkins Status](https://ci.opensuse.org/buildStatus/icon?job=yast-yast-http-server-master)](
https://ci.opensuse.org/view/Yast/job/yast-yast-http-server-master/)
[![Coverage Status](https://img.shields.io/coveralls/yast/yast-http-server.svg)](https://coveralls.io/r/yast/yast-http-server?branch=master)
File renamed without changes.
2 changes: 1 addition & 1 deletion travis_package_check.sh → ci_package_check.sh
Expand Up @@ -3,4 +3,4 @@
set -e
make -f Makefile.cvs
make install
./travis_package_check.rb
./ci_package_check.rb
18 changes: 13 additions & 5 deletions test/test_helper.rb
Expand Up @@ -35,12 +35,20 @@
# track all ruby files under src
SimpleCov.track_files("#{srcdir}/**/*.rb")

# use coveralls for on-line code coverage reporting at Travis CI
if ENV["TRAVIS"]
require "coveralls"
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new [
# additionally use the LCOV format for on-line code coverage reporting at CI
if ENV["CI"] || ENV["COVERAGE_LCOV"]
require "simplecov-lcov"

SimpleCov::Formatter::LcovFormatter.config do |c|
c.report_with_single_file = true
# this is the default Coveralls GitHub Action location
# https://github.com/marketplace/actions/coveralls-github-action
c.single_report_path = "coverage/lcov.info"
end

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
SimpleCov::Formatter::LcovFormatter
]
end
end
Expand Down

0 comments on commit 513bb24

Please sign in to comment.