74 lines
2.0 KiB
YAML
74 lines
2.0 KiB
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
jobs:
|
|
bootstrap:
|
|
strategy:
|
|
matrix:
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Run bootstrap
|
|
run: make bootstrap
|
|
env:
|
|
DOTFILES_CI: 1
|
|
- name: Install neovim
|
|
uses: rhysd/action-setup-vim@v1
|
|
with:
|
|
neovim: true
|
|
- name: Install packer
|
|
if: ${{ matrix.platform != 'windows-latest' }}
|
|
run: |
|
|
git clone https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim
|
|
- name: Install packer on Windows
|
|
if: ${{ matrix.platform == 'windows-latest' }}
|
|
run: |
|
|
git clone https://github.com/wbthomason/packer.nvim "$env:LOCALAPPDATA\nvim-data\site\pack\packer\start\packer.nvim"
|
|
- name: Run neovim checks
|
|
run: make check_neovim
|
|
env:
|
|
DOTFILES_CI: 1
|
|
- name: Run tests
|
|
if: ${{ matrix.platform != 'windows-latest' }}
|
|
run: |
|
|
export PATH="$HOME/bin:$PATH"
|
|
make run_tests
|
|
env:
|
|
DOTFILES_CI: 1
|
|
create-key:
|
|
strategy:
|
|
matrix:
|
|
platform: [ubuntu-latest, macos-latest]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Run key creation
|
|
run: echo "test\n\n" | make create_personal_ssh_github_key
|
|
env:
|
|
DOTFILES_CI: 1
|
|
stylua:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Run stylua
|
|
uses: JohnnyMorganz/stylua-action@1.0.0
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: --check .
|
|
luacheck:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install luacheck
|
|
run: sudo apt-get install -y lua-check
|
|
- name: Run luacheck
|
|
run: |
|
|
cd symlinks/config/nvim
|
|
luacheck .
|