Skip to content

Commit

Permalink
Move some tests from Travis CI to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
henrywang committed Feb 1, 2021
1 parent 1e29292 commit ff6daca
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 51 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/eslint-styleline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: eslint-stylelint

on: [pull_request]

jobs:
eslint-stylelint:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
tests: ["eslint", "stylelint"]

steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: npm install

- name: Run test
run: make ${{ matrix.tests }}
20 changes: 20 additions & 0 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: flake8

on: [pull_request]

jobs:
flake8:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Lint with flake8
run: |
pip install flake8
make flake8
18 changes: 18 additions & 0 deletions .github/workflows/rpm-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: rpm-build

on: [pull_request]

jobs:
rpm-build:
runs-on: ubuntu-20.04
container:
image: quay.io/fedora/fedora:33-x86_64

steps:
- name: Install Dependencies
run: dnf install -y make cmake rpm-build which gnupg git tar xz rsync curl jq nodejs python gcc gcc-c++ libappstream-glib

- uses: actions/checkout@v2

- name: Run rpm-build test
run: make rpm srpm
48 changes: 0 additions & 48 deletions .travis.yml

This file was deleted.

4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Cockpit Composer

[![Build Status](https://travis-ci.org/osbuild/cockpit-composer.svg?branch=master)](https://travis-ci.org/osbuild/cockpit-composer)
[![codecov](https://codecov.io/gh/osbuild/cockpit-composer/branch/master/graph/badge.svg)](https://codecov.io/gh/osbuild/cockpit-composer)

**The web interface for Composer!**
Expand Down Expand Up @@ -140,10 +139,9 @@ After every change to your sources, run `make` to update all the webpacks, and r
│ └── /index.ejs # Template for index.html
├── /test/ # Integration test
├── /utils/ # Utility and helper classes
│── .travis.yml # Travis CI settings
│── babel.config.js # babel configurations
│── cockpit-composer.spec.in # Cockpit-composer spec file
│── Dockerfile.buildrpm # Dockerfile for building RPM on Travis
│── Dockerfile.buildrpm # Dockerfile for building RPM on Github Actions
│── io.weldr.cockpit-composer.metainfo.xml # Makes Composer appear on Cockpit's "Applications" page
│── main.js # React application entry point
│── Makefile # Makefile
Expand Down

0 comments on commit ff6daca

Please sign in to comment.