|
1 | | -name: CI |
2 | | -on: [push] |
| 1 | +name: test |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + pull_request: |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +concurrency: |
| 11 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 12 | + cancel-in-progress: true |
| 13 | + |
| 14 | +env: |
| 15 | + UNDERCOVER_CONFIG: "(\"smartparens.el\" \"smartparens-*.el\" (:report-format lcov) (:send-report nil))" |
3 | 16 |
|
4 | 17 | jobs: |
5 | | - build: |
6 | | - runs-on: ubuntu-latest |
| 18 | + test: |
| 19 | + runs-on: ${{ matrix.os }} |
7 | 20 | strategy: |
| 21 | + fail-fast: false |
8 | 22 | matrix: |
9 | | - emacs_version: |
| 23 | + os: |
| 24 | + - ubuntu-latest |
| 25 | + - macos-latest |
| 26 | + - windows-latest |
| 27 | + emacs-version: |
10 | 28 | - '25.1' |
11 | 29 | - '25.2' |
12 | 30 | - '25.3' |
13 | 31 | - '26.1' |
14 | 32 | - '26.2' |
15 | 33 | - '26.3' |
| 34 | + - '27.1' |
| 35 | + - '27.2' |
| 36 | + - '28.1' |
| 37 | + - '28.2' |
16 | 38 | - 'snapshot' |
17 | 39 | include: |
18 | | - - emacs_version: 'snapshot' |
| 40 | + - emacs-version: 'snapshot' |
19 | 41 | allow_failure: true |
20 | 42 | steps: |
21 | | - - uses: actions/checkout@v1 |
22 | | - - uses: purcell/setup-emacs@master |
| 43 | + - uses: jcs090218/setup-emacs@master |
| 44 | + with: |
| 45 | + version: ${{ matrix.emacs-version }} |
| 46 | + |
| 47 | + # Remove expired DST Root CA X3 certificate. Workaround for |
| 48 | + # https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51038 bug on Emacs 27.2. |
| 49 | + # https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-1126671598 |
| 50 | + - name: Workaround for Emacs 27.2's Windows build from GNU FTP |
| 51 | + if: ${{ runner.os == 'Windows' && matrix.emacs-version == '27.2' }} |
| 52 | + run: | |
| 53 | + gci cert:\LocalMachine\Root\DAC9024F54D8F6DF94935FB1732638CA6AD77C13 |
| 54 | + gci cert:\LocalMachine\Root\DAC9024F54D8F6DF94935FB1732638CA6AD77C13 | Remove-Item |
| 55 | +
|
| 56 | + - uses: emacs-eask/setup-eask@master |
23 | 57 | with: |
24 | | - version: ${{ matrix.emacs_version }} |
25 | | - |
26 | | - - uses: conao3/setup-cask@master |
| 58 | + version: 'snapshot' |
| 59 | + |
| 60 | + - uses: actions/checkout@v3 |
27 | 61 |
|
28 | 62 | - name: Install dependencies |
29 | | - run: 'cask install' |
| 63 | + run: 'eask install-deps --dev' |
30 | 64 |
|
31 | | - - name: Run tests |
32 | | - if: matrix.allow_failure != true |
| 65 | + - name: Run ERT tests |
33 | 66 | run: | |
34 | | - cask exec ert-runner --reporter ert+duration |
| 67 | + eask exec ert-runner --reporter ert+duration |
35 | 68 | cask exec emacs --eval "(setq byte-compile-error-on-warn t)" -L . --batch -f batch-byte-compile smartparens.el smartparens-*[^pkg].el |
36 | 69 |
|
37 | | - - name: Run tests (allow failure) |
38 | | - if: matrix.allow_failure == true |
| 70 | + - name: Coveralls |
| 71 | + uses: coverallsapp/github-action@master |
| 72 | + with: |
| 73 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 74 | + flag-name: emacs-${{ matrix.emacs-version }} |
| 75 | + parallel: true |
| 76 | + |
| 77 | + - name: Test installation and compilation |
39 | 78 | run: | |
40 | | - cask exec ert-runner --reporter ert+duration || true |
41 | | - cask exec emacs --eval "(setq byte-compile-error-on-warn t)" -L . --batch -f batch-byte-compile smartparens.el smartparens-*[^pkg].el || true |
| 79 | + eask clean all |
| 80 | + eask package |
| 81 | + eask install |
| 82 | + eask compile |
| 83 | +
|
| 84 | + finish: |
| 85 | + needs: test |
| 86 | + runs-on: ubuntu-latest |
| 87 | + steps: |
| 88 | + - name: Coveralls Finished |
| 89 | + uses: coverallsapp/github-action@master |
| 90 | + with: |
| 91 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 92 | + parallel-finished: true |
0 commit comments