Parcourir la source

Github workflows (#807)

* test github workflows

* added stylua checking as well
Abouzar Parvan il y a 4 ans
Parent
commit
a222f4ecb8
2 fichiers modifiés avec 99 ajouts et 0 suppressions
  1. 28 0
      .github/workflows/format.yaml
  2. 71 0
      .github/workflows/install.yaml

+ 28 - 0
.github/workflows/format.yaml

@@ -0,0 +1,28 @@
+name: format
+on:
+  push:
+    branches: '**'
+  pull_request:
+    branches:
+      - 'master'
+      - 'rolling'
+
+jobs:
+  stylua-check:
+    name: "Formatting check with Stylua"
+    runs-on: ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+
+      - name: Prepare dependencies
+        run: |
+          sudo apt update
+          sudo apt install -y curl
+          curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
+          cargo install stylua
+      
+      - name: Check formatting
+        run: |
+          cp ./utils/.stylua.toml .
+          stylua -c .
+

+ 71 - 0
.github/workflows/install.yaml

@@ -0,0 +1,71 @@
+name: install
+on:
+  push:
+    branches: '**'
+  pull_request:
+    branches:
+      - 'master'
+      - 'rolling'
+
+jobs:
+  unixish:
+    name: ${{ matrix.os }} ${{ matrix.runner }}
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+          - runner: ubuntu-20.04
+            os: linux
+          - runner: macos-10.15
+            os: osx
+    runs-on: ${{ matrix.runner }}
+    if: github.event.pull_request.draft == false
+    steps:
+      - uses: actions/checkout@v2
+      
+      - name: Install dependencies for Linux
+        if: matrix.os == 'linux'
+        run: |
+          sudo apt-get install -y gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip build-essential
+          sudo bash ./utils/bin/install-latest-neovim
+
+      - name: Installl dependencies for OSX
+        if: matrix.os == 'osx'
+        run: |
+          brew update >/dev/null
+          brew upgrade
+          brew install neovim
+
+      - name: Install LunarVim
+        run: |
+          bash ./utils/installer/install.sh
+
+      - name: Test LunarVim PackerCompile
+        run: if nvim --headless +PackerCompile -c ':qall' 2>&1|grep -q 'Error'; then false; fi
+
+      - name: Test LunarVim Health
+        run: if nvim --headless +checkhealth -c ':qall' 2>&1|grep -q 'Error'; then false; fi
+
+  freebsd:
+    runs-on: macos-latest
+    continue-on-error: true # we don't support freebsd yet
+    name: "FreeBSD macos-latest"
+    steps:
+      - uses: actions/checkout@v2
+      
+      - name: Install dependencies for FreeBSD
+        uses: vmactions/freebsd-vm@v0.1.5
+        with:
+          prepare: pkg install -y curl neovim
+          run: bash ./utils/installer/install.sh
+
+      - name: Test LunarVim PackerCompile
+        uses: vmactions/freebsd-vm@v0.1.5
+        with:
+          run: if nvim --headless +PackerCompile -c ':qall' 2>&1|grep -q 'Error'; then false; fi
+
+      - name: Test LunarVim Health
+        uses: vmactions/freebsd-vm@v0.1.5
+        with:
+          run: if nvim --headless +checkhealth -c ':qall' 2>&1|grep -q 'Error'; then false; fi
+