Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: migrate from Travis to GitHub Actions #421

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: shellcheck
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: ShellCheck
uses: ludeeus/[email protected]
#with:
# A space separated list of additional filename to check
#additional_files: # optional, default is
# Paths to ignore when running ShellCheck
#ignore: # optional, default is
# Minimum severity of errors to consider. Options: [error, warning, info, style]
#severity: # optional, default is
# Run shellcheck on _all_ files at once, instead of one at a time
#check_together: # optional, default is
# Directory to be searched for files. Defaults to .
#scandir: # optional, default is .
# Set to true to skip using problem-matcher
#disable_matcher: # optional, default is false
# Output format (checkstyle, diff, gcc, json, json1, quiet, tty)
#format: # optional, default is gcc
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
highlight_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install build dependencies
run: sudo apt-get install -y autoconf automake autopoint gcc gettext git groff make pkg-config texinfo libncurses5-dev

- name: Clone and configure GNU nano
run: |
git clone --depth 100 git://git.savannah.gnu.org/nano.git
cd nano
./autogen.sh
./configure --prefix=/usr
cd -

- name: Build and install nano
run: |
cd nano
make -j
sudo make install
cd -
nano --version

- name: Test highlighting files
run: |
mkdir -p ~/.nano/
cp -al *.nanorc ~/.nano/
TERM=xterm timeout 1s nano --rcfile ./nanorc >/dev/null 2>error.txt || true
grep -v -e "Received SIGHUP or SIGTERM" -e "Too many errors from stdin" error.txt && false
echo "All seems good!"
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Improved Nano Syntax Highlighting Files

[![shellcheck](https://github.com/scopatz/nanorc/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/scopatz/nanorc/actions/workflows/shellcheck.yml)
[![test](https://github.com/scopatz/nanorc/actions/workflows/test.yml/badge.svg)](https://github.com/scopatz/nanorc/actions/workflows/test.yml)

This repository holds ``{lang}.nanorc`` files that have improved definitions of syntax highlighting for various languages.

## Installation
Expand Down
4 changes: 0 additions & 4 deletions shellcheck.sh

This file was deleted.