aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
blob: 1a5a956b7d2a579025a867f5c20fab99898e723a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: ci

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  scripts:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Run tests for scripts
        run: |
          ./bin/test/test.sh

  emacs:
    runs-on: ubuntu-latest
    continue-on-error: ${{ matrix.emacs_version == 'snapshot' }}

    strategy:
      fail-fast: false
      matrix:
        emacs_version:
          - '27.2'
          - 'snapshot'

    steps:
      - uses: actions/checkout@v2

      - uses: purcell/setup-emacs@master
        with:
          version: ${{ matrix.emacs_version }}

      - name: Install dependencies for Doom
        run: |
          sudo apt-get install ripgrep

      - name: Install some other dependencies
        run: |
          mkdir -p $HOME/src/github.com/mssola
          cd $HOME/src/github.com/mssola
          git clone https://github.com/mssola/soria.git

      - name: Install Doom Emacs
        run: |
          git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
          ~/.emacs.d/bin/doom install --no-config --no-env --no-fonts

      - name: Sync
        run: |
          cp -r $(realpath .doom.d) $HOME/.doom.d
          ~/.emacs.d/bin/doom sync

      - name: Check Doom installation
        run: |
          ~/.emacs.d/bin/doom doctor
          test -z "$(~/.emacs.d/bin/doom doctor | grep 'errors!')"

      - name: Try to start Emacs
        run: |
          echo "Attempting startup..."
          ${EMACS:=emacs} -nw -Q --batch --load $HOME/.emacs.d/init.el
          echo "Startup successful"