nnreddit/.github/workflows/test.yml

96 lines
2.2 KiB
YAML

name: CI
on:
pull_request:
paths-ignore:
- '**.md'
- '**.rst'
push:
paths-ignore:
- '**.md'
- '**.rst'
branches-ignore:
- 'master'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
emacs_version: [27.2, 28.2, 29.3]
python_version: [3.8]
include:
- os: macos-12
emacs_version: 29.3
python_version: 3.8
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
- uses: purcell/setup-emacs@master
with:
version: ${{ matrix.emacs_version }}
- uses: actions/cache@v2
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-000
- uses: actions/cache@v2
if: startsWith(runner.os, 'macOS')
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-000
- uses: actions/cache@v2
with:
path: ~/local
key: ${{ runner.os }}-local-000
- uses: actions/cache@v2
with:
path: ~/.emacs.d
key: emacs.d
- 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 dirmngr libreadline-dev libcurl4-openssl-dev virtualenv
- uses: actions/cache@v2
id: cache-cask-packages
with:
path: .cask
key: cache-cask-packages-000
- uses: actions/cache@v2
id: cache-cask-executable
with:
path: ~/.cask
key: cache-cask-executable-000
- uses: conao3/setup-cask@master
if: steps.cache-cask-executable.outputs.cache-hit != 'true'
with:
version: snapshot
- name: paths
run: |
echo "$HOME/local/bin" >> $GITHUB_PATH
echo "$HOME/.cask/bin" >> $GITHUB_PATH
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=$HOME/.local/lib" >> $GITHUB_ENV
- name: test
run: |
make test-run
make test
continue-on-error: ${{ matrix.emacs_version == 'snapshot' }}