From ccbe62f58b72931008a7b26c3e8ab92e2bc3a52c Mon Sep 17 00:00:00 2001 From: Martino Pilia Date: Sat, 26 Jun 2021 16:29:05 +0200 Subject: [PATCH] Switch to GitHub Actions --- .github/workflows/checks.yml | 45 ++++++++++++++++++++++++++++++++ .ignore | 5 ++++ .travis.yml | 14 ---------- README.md | 3 ++- translations/extract-messages.sh | 2 +- 5 files changed, 53 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/checks.yml create mode 100644 .ignore delete mode 100644 .travis.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 0000000..2ba1db2 --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,45 @@ +name: Checks + +on: [push, pull_request] + +jobs: + qmllint: + runs-on: ubuntu-20.04 + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Install dependencies + run: | + sudo apt-get install -y --no-install-recommends qtdeclarative5-dev-tools + + - name: Run qmllint + run: | + find . -name \*.qml -exec /usr/lib/x86_64-linux-gnu/qt5/bin/qmllint {} \+ + + ESLint: + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Install ESLint + run: | + sudo npm install -g eslint + + - name: Run ESLint + run: | + eslint . + + Shellcheck: + name: Shellcheck + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@1.1.0 diff --git a/.ignore b/.ignore new file mode 100644 index 0000000..8a3922d --- /dev/null +++ b/.ignore @@ -0,0 +1,5 @@ +!.eslintrc.yml +!.github/ +!.gitignore +!.gitmodules +!.ignore diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7fd678d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -sudo: required -dist: xenial -node_js: - - "7" -before_install: - - sudo apt-get install -y qtdeclarative5-dev-tools -before_script: - - npm install -g eslint -language: generic -script: - - find . -name \*.qml -exec /usr/lib/x86_64-linux-gnu/qt5/bin/qmllint {} \+ - - find . -name \*.js -exec eslint {} \+ - - find . -name \*.sh -exec shellcheck {} \+ diff --git a/README.md b/README.md index c38f6ff..73121cb 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Ambient noise applet for Plasma 5 -[![Travis CI Build Status](https://travis-ci.org/m-pilia/plasma-applet-ambientnoise.svg?branch=master)](https://travis-ci.org/m-pilia/plasma-applet-ambientnoise) +[![Checks](https://github.com/m-pilia/plasma-applet-ambientnoise/workflows/Checks/badge.svg)](https://github.com/m-pilia/plasma-applet-ambientnoise/actions/workflows/checks.yml) + ![screenshot](https://user-images.githubusercontent.com/8300317/27260682-155864dc-5432-11e7-8afa-4327cac14e32.png) diff --git a/translations/extract-messages.sh b/translations/extract-messages.sh index 159bd09..5f47e2f 100755 --- a/translations/extract-messages.sh +++ b/translations/extract-messages.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash set -euo pipefail BASEDIR=".." # root of translatable sources