diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7bfe9fd0..bee7b06f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,41 +1,92 @@ -name: CI -on: [push] +name: test + +on: + push: + branches: + - master + pull_request: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + UNDERCOVER_CONFIG: "(\"smartparens.el\" \"smartparens-*.el\" (:report-format lcov) (:send-report nil))" jobs: - build: - runs-on: ubuntu-latest + test: + runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: - emacs_version: + os: + - ubuntu-latest + - macos-latest + - windows-latest + emacs-version: - '25.1' - '25.2' - '25.3' - '26.1' - '26.2' - '26.3' + - '27.1' + - '27.2' + - '28.1' + - '28.2' - 'snapshot' include: - - emacs_version: 'snapshot' + - emacs-version: 'snapshot' allow_failure: true steps: - - uses: actions/checkout@v1 - - uses: purcell/setup-emacs@master + - uses: jcs090218/setup-emacs@master + with: + version: ${{ matrix.emacs-version }} + + # Remove expired DST Root CA X3 certificate. Workaround for + # https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51038 bug on Emacs 27.2. + # https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-1126671598 + - name: Workaround for Emacs 27.2's Windows build from GNU FTP + if: ${{ runner.os == 'Windows' && matrix.emacs-version == '27.2' }} + run: | + gci cert:\LocalMachine\Root\DAC9024F54D8F6DF94935FB1732638CA6AD77C13 + gci cert:\LocalMachine\Root\DAC9024F54D8F6DF94935FB1732638CA6AD77C13 | Remove-Item + + - uses: emacs-eask/setup-eask@master with: - version: ${{ matrix.emacs_version }} - - uses: actions/setup-python@v1.1.1 - - uses: conao3/setup-cask@master + version: 'snapshot' + + - uses: actions/checkout@v3 - name: Install dependencies - run: 'cask install' + run: 'eask install-deps --dev' - - name: Run tests - if: matrix.allow_failure != true + - name: Run ERT tests run: | - cask exec ert-runner --reporter ert+duration + eask exec ert-runner --reporter ert+duration cask exec emacs --eval "(setq byte-compile-error-on-warn t)" -L . --batch -f batch-byte-compile smartparens.el smartparens-*[^pkg].el - - name: Run tests (allow failure) - if: matrix.allow_failure == true + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + flag-name: emacs-${{ matrix.emacs-version }} + parallel: true + + - name: Test installation and compilation run: | - cask exec ert-runner --reporter ert+duration || true - cask exec emacs --eval "(setq byte-compile-error-on-warn t)" -L . --batch -f batch-byte-compile smartparens.el smartparens-*[^pkg].el || true + eask clean all + eask package + eask install + eask compile + + finish: + needs: test + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true diff --git a/.gitignore b/.gitignore index 179f3a96..8ddfd917 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ elpa *~* docs/_build .dir-locals-2.el +/.eask +/.elsa diff --git a/Eask b/Eask new file mode 100644 index 00000000..f73645fe --- /dev/null +++ b/Eask @@ -0,0 +1,41 @@ +(package "smartparens" "1.11.0" + "Automatic insertion, wrapping and paredit-like navigation with user defined pairs.") + +(website-url "https://github.com/Fuco1/smartparens") +(keywords "abbrev" "convenience" "editing") + +(package-file "smartparens.el") + +(files "smartparens.el" "smartparens-*.el") + +(script "test" "echo \"Error: no test specified\" && exit 1") + +(source "gnu") +(source "melpa") + +(depends-on "cl-lib" "0.3") +(depends-on "dash" "2.13.0") + +(development + (depends-on "elsa") + (depends-on "f") + (depends-on "ert-runner") + (depends-on "undercover") + (depends-on "shut-up") + (depends-on "racket-mode") + (depends-on "scala-mode") + (depends-on "rust-mode") + (depends-on "swift-mode") + (depends-on "auctex") + (depends-on "clojure-mode") + (depends-on "lua-mode") + (depends-on "js2-mode") + (depends-on "ess") + (depends-on "tuareg") + (depends-on "elixir-mode") + (depends-on "haskell-mode") + (depends-on "markdown-mode") + (depends-on "hungry-delete") + (depends-on "evil") + (depends-on "crystal-mode") + (depends-on "go-mode")) diff --git a/test/test-helper.el b/test/test-helper.el index 097bdef9..1d3b70f3 100644 --- a/test/test-helper.el +++ b/test/test-helper.el @@ -12,8 +12,7 @@ ;;; Code: -;; (when (require 'undercover nil t) -;; (undercover "smartparens*.el")) +(when (require 'undercover nil t) (undercover)) (require 'ert) (require 'dash)