Upgrade to version 7.2! #84
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: '50' | |
- name: Fetch nano $VERSION | |
run: | | |
VERSION=$(git branch --show-current) | |
if [[ "$VERSION" != v* ]]; then | |
# either triggered by tag or on main branch | |
git fetch --tags | |
VERSION=$(git describe --tags --abbrev=0 | sed 's/-r.*$//') | |
fi | |
echo "VERSION: $VERSION" | |
git clone --depth 1 --branch $VERSION git://git.savannah.gnu.org/nano.git | |
- name: Setup and configure nano | |
run: | | |
cd nano | |
sudo apt-get install -y autoconf automake autopoint gcc gettext git groff make pkg-config texinfo libncurses5-dev | |
./autogen.sh | |
./configure --prefix=/usr | |
cd - | |
- name: Build and install nano | |
run: | | |
cd nano | |
make -j | |
sudo make install | |
cd - | |
nano --version | |
- name: Test rcfile | |
run: | | |
sed '1,/```/d' README.md | sed -n '/```/q;p' > .nanorc | |
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!" |