nntwitter/.github/workflows/test.yml

106 lines
2.4 KiB
YAML

name: CI
on:
pull_request:
paths-ignore:
- '**.md'
push:
paths-ignore:
- '**.md'
branches-ignore:
- 'main'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
emacs_version: [25.1, 26.3, 27.2, 28.2]
python_version: [3.7]
include:
- os: macos-latest
emacs_version: 28.2
steps:
- uses: actions/checkout@v1
- name: python ${{ matrix.python_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- uses: purcell/setup-emacs@master
with:
version: ${{ matrix.emacs_version }}
- uses: actions/cache@v1
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-000
- uses: actions/cache@v1
with:
path: ~/melpazoid-master
key: melpazoid-000
- uses: actions/cache@v1
if: startsWith(runner.os, 'macOS')
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-000
- uses: actions/cache@v1
with:
path: ~/local
key: ${{ runner.os }}-local-000
- uses: actions/cache@v1
with:
path: ~/.emacs.d
key: emacs.d
- uses: actions/cache@v1
with:
path: ~/.cask
key: cask-000
- name: paths
run: |
echo "$HOME/local/bin" >> $GITHUB_PATH
echo "$HOME/local/cask/bin" >> $GITHUB_PATH
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=$HOME/.local/lib" >> $GITHUB_ENV
- name: apt-get
if: startsWith(runner.os, 'Linux')
run: |
sudo apt-get -yq update
DEBIAN_FRONTEND=noninteractive sudo apt-get -yq install gnutls-bin sharutils gnupg2 dirmngr libreadline-dev libcurl4-openssl-dev virtualenv
- name: gnupg
if: startsWith(runner.os, 'macOS')
run: brew list gnupg &>/dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install gnupg
- name: dependencies
run: |
python -m pip install --upgrade pip
pip install yq setuptools wheel
- name: versions
run: |
curl --version
emacs --version
gpg --version
- name: cask
run: |
sh tools/install-cask.sh
cask link list
- name: test
run: |
make test
continue-on-error: ${{ matrix.emacs_version == 'snapshot' }}