emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/bnf-mode 2887fa5 30/43: Merge pull request #6 from serg


From: Stefan Monnier
Subject: [elpa] externals/bnf-mode 2887fa5 30/43: Merge pull request #6 from sergeyklay/feature/gh-actions
Date: Mon, 20 Jan 2020 13:39:04 -0500 (EST)

branch: externals/bnf-mode
commit 2887fa511ff1a895917438f170957bb482c19982
Merge: eb1a2ed 538b6b2
Author: Serghei Iakovlev <address@hidden>
Commit: GitHub <address@hidden>

    Merge pull request #6 from sergeyklay/feature/gh-actions
    
    Move CI/CD process on GitHub Actions
---
 .codecov.yml                  |  54 ++++++++++++++++++++++
 .github/workflows/build.yml   | 101 ++++++++++++++++++++++++++++++++++++++++
 .github/workflows/release.yml |  97 ++++++++++++++++++++++++++++++++++++++
 .gitignore                    |   3 +-
 .travis.yml                   | 105 ------------------------------------------
 Makefile                      |   6 +--
 NEWS                          |   5 +-
 README.org                    |   5 +-
 bnf-mode.el                   |   8 ++--
 test/bnf-mode-font-test.el    |   8 ++--
 test/test-helper.el           |  15 ++++--
 11 files changed, 282 insertions(+), 125 deletions(-)

diff --git a/.codecov.yml b/.codecov.yml
new file mode 100644
index 0000000..1751a40
--- /dev/null
+++ b/.codecov.yml
@@ -0,0 +1,54 @@
+# Copyright (C) 2019-2020 Serghei Iakovlev
+#
+# License
+#
+# This file is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 3
+# of the License, or (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+codecov:
+  notify:
+    # will no delay sending notifications until all ci is finished
+    require_ci_to_pass: no
+
+coverage:
+  precision: 2
+  round: down
+  range: "65...90"
+
+  status:
+    project:
+      default:
+        # the amount that coverage can drop while still posting a success
+        threshold: 1%
+    patch: no
+    changes: no
+
+comment:
+  layout: diff
+  behavior: default
+  require_changes: false
+
+ignore:
+  - ".git"
+  - "*.yml"
+  - "*.json"
+  - "*.md"
+  - "*.mk"
+  - "*.txt"
+
+  # ignore folders and all its contents
+  - ".cask/.*"
+  - ".github/.*"
+  - "test/.*"
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..00fc46b
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,101 @@
+# Copyright (C) 2019-2020 Serghei Iakovlev
+#
+# License
+#
+# This file is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 3
+# of the License, or (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+name: build
+
+on:
+  push:
+    paths-ignore:
+      - '**.md'
+      - '**.txt'
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  build:
+    name: "GNU Emacs ${{ matrix.emacs_version }}"
+    runs-on: ubuntu-latest
+
+    strategy:
+      fail-fast: false
+
+      matrix:
+        emacs_version:
+          - '24.3'
+          - '24.4'
+          - '24.5'
+          - '25.1'
+          - '25.2'
+          - '25.3'
+          - '26.1'
+          - '26.2'
+          - '26.3'
+          - snapshot
+
+    steps:
+      - name: Checkout Code
+        uses: actions/checkout@v2-beta
+        with:
+          fetch-depth: 5
+
+      - name: Setup GNU Emacs
+        uses: purcell/setup-emacs@master
+        with:
+          version: ${{ matrix.emacs_version }}
+
+      - name: Setup Cask
+        run: curl -fsSkL https://raw.github.com/cask/cask/master/go | python
+
+      - name: Set Environment Variables
+        run: |
+          echo "::set-env name=PATH::$HOME/.cask/bin:$PATH"
+
+          if [ "${{ matrix.emacs_version }}" != "snapshot" ]; then
+            echo "::set-env name=UNDERCOVER_FORCE::1"
+          fi
+
+      - name: Fast Makefile Test
+        run: make help
+
+      - name: Initialize the Project
+        run: make init
+
+      - name: Byte Compile BNF Mode
+        run: make build
+
+      - name: Check for Errors in the Documentation
+        if: matrix.emacs_version >= '25.1'
+        run: make checkdoc
+
+      - name: Run Unit Tests
+        run: make test
+
+      - name: Build Reporting
+        if: success()
+        run: git log --format=fuller -5
+
+      - name: Upload Code Coverage Report
+        uses: codecov/codecov-action@v1
+        with:
+          token: ${{ secrets.CODECOV_TOKEN }}
+          yml: ./.codecov.yml
+          name: codecov-umbrella
+          flags: unittests
+          fail_ci_if_error: false
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..246a53c
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,97 @@
+# Copyright (C) 2019-2020 Serghei Iakovlev
+#
+# License
+#
+# This file is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 3
+# of the License, or (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+name: release
+
+on:
+  push:
+    tags:
+      - '*'
+
+jobs:
+  build:
+    name: Upload Release Asset
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout Code
+        uses: actions/checkout@v2-beta
+        with:
+          fetch-depth: 1
+
+      - name: Setup GNU Emacs
+        uses: purcell/setup-emacs@master
+        with:
+          version: 26.3
+
+      - name: Setup Cask
+        run: curl -fsSkL https://raw.github.com/cask/cask/master/go | python
+
+      - name: Set Environment Variables
+        run: |
+          echo "::set-env name=PATH::$HOME/.cask/bin:$PATH"
+          echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
+
+      - name: Common settings
+        run: |
+          git config --global user.name "Serghei Iakovlev"
+          git config --global user.email address@hidden
+
+      - name: Setup Prerequisites
+        run: |
+          # I don't need this at all. However I noticed
+          # that builds often fails because Microsoft
+          # servers are unstable or even offline.
+          sudo rm -f /etc/apt/sources.list.d/dotnetdev.list
+          sudo rm -f /etc/apt/sources.list.d/azure*.list
+
+          sudo apt-get update --quiet --yes 1>/dev/null
+          sudo apt-get install texinfo bsdtar pandoc
+
+      - name: Initialize the Project
+        run: make init
+
+      - name: Build Package
+        run: make package
+
+      - name: Minimal Package Test
+        run: |
+          test "$(tar --list --file bnf-mode-${VERSION}.tar | wc -l)" = 7
+
+      - name: Create Release
+        id: create_release
+        uses: actions/create-release@v1.0.0
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          tag_name: ${{ github.ref }}
+          release_name: $VERSION
+          draft: false
+          prerelease: false
+
+      - name: Upload Release Asset
+        id: upload-release-asset
+        uses: actions/upload-release-asset@v1.0.1
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          upload_url: ${{ steps.create_release.outputs.upload_url }}
+          asset_path: "bnf-mode-${VERSION}.tar"
+          asset_name: "bnf-mode-${VERSION}.tar"
+          asset_content_type: application/x-tar
diff --git a/.gitignore b/.gitignore
index b45c0df..a59fd18 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,10 +7,11 @@
 
 *~
 *.elc
-.cask/
+.cask
 bnf-mode.info
 bnf-mode-pkg.el
 bnf-mode-autoloads.el
 bnf-mode-*.tar
+coverage-final.json
 ChangeLog
 README
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 6344a98..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright (C) 2019 Serghei Iakovlev
-#
-# This file is NOT part of GNU Emacs.
-#
-# License
-#
-# This file is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 3
-# of the License, or (at your option) any later version.
-#
-# This file is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this file; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-language: emacs-lisp
-
-# Cache stable Emacs binaries, packages and Cask
-cache:
-  apt: true
-  timeout: 604800
-  directories:
-    - "$HOME/emacs"
-    # Cache BNF Mode dependencies
-    - ".cask/"
-    # Cache Cask bootstrap dependencies
-    - "$HOME/.emacs.d/.cask"
-
-addons:
-  apt:
-    packages:
-      - bsdtar
-      - texinfo
-
-git:
-  depth: 1
-
-env:
-  matrix:
-    - EMACS_VERSION=24.3
-    - EMACS_VERSION=24.4
-    - EMACS_VERSION=24.5
-    - EMACS_VERSION=25.1
-    - EMACS_VERSION=25.2
-    - EMACS_VERSION=25.3
-    - EMACS_VERSION=26.1
-    - EMACS_VERSION=26.2
-    - EMACS_VERSION=git-snapshot
-  global:
-    - PATH="$HOME/bin:$HOME/.cask/bin:$HOME/.evm/bin:$PATH"
-
-# Allow Emacs snapshot builds to fail and don't wait for it
-matrix:
-  fast_finish: true
-  allow_failures:
-    - env: EMACS_VERSION=git-snapshot
-
-before_install:
-  # Setup Emacs Version Manager
-  - git clone -q --depth=1 https://github.com/rejeep/evm.git $HOME/.evm
-  - evm config path /tmp
-
-install:
-  # Install Emacs (according to $EMACS_VERSION) and Cask
-  - evm install emacs-$EMACS_VERSION-travis --use --skip
-  - curl -fsSkL https://raw.github.com/cask/cask/master/go | python
-
-before_script:
-  # Configure $EMACS_MAJOR_VERSION
-  - EMACS_MAJOR_VERSION="$(echo $EMACS_VERSION | cut -d '.' -f 1)"
-
-script:
-  - make help
-  - make init
-  - make build
-  # The 'checkdoc-file' present on Emacs >= 25.1
-  - '[[ "$EMACS_MAJOR_VERSION" = "24" ]] || make checkdoc'
-  - make test
-
-before_deploy:
-  - git config --global user.name "Serghei Iakovlev"
-  - git config --global user.email address@hidden
-  - wget 
https://github.com/jgm/pandoc/releases/download/2.7.2/pandoc-2.7.2-1-amd64.deb 
-o /dev/null
-  - sudo dpkg -i pandoc-2.7.2-1-amd64.deb
-  - make package
-
-deploy:
-  provider: releases
-  api_key: $GITHUB_TOKEN
-  file_glob: true
-  file: bnf-mode-*.tar
-  skip_cleanup: true
-  on:
-    tags: true
-    condition: $EMACS_VERSION = 26.1
-    repo: sergeyklay/bnf-mode
-
-notifications:
-  email: false
diff --git a/Makefile b/Makefile
index 3ff712a..c04c01c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 Serghei Iakovlev
+# Copyright (C) 2019-2020 Serghei Iakovlev
 #
 # License
 #
@@ -130,8 +130,8 @@ help: .title
        echo ''
        echo 'Available targets:'
        echo '  help:     Show this help and exit'
-       echo '  init:     Initialise the project (has to be launched first)'
-       echo '  checkdoc: Checks BNF Mode code for errors in documentation'
+       echo '  init:     Initialize the project (has to be launched first)'
+       echo '  checkdoc: Checks BNF Mode code for errors in the documentation'
        echo '  build:    Byte compile BNF Mode package'
        echo '  test:     Run the non-interactive unit test suite'
        echo '  clean:    Remove all byte compiled Elisp files as well as build'
diff --git a/NEWS b/NEWS
index fb259f8..1c0cc27 100644
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,13 @@
 bnf-mode NEWS -- history of user-visible changes.
 
-Copyright (C) 2019 Free Software Foundation, Inc.
+Copyright (C) 2019-2020 Free Software Foundation, Inc.
 See the end of the file for license conditions.
 
 This file is about changes in BNF Mode.
 
+* BNF Mode 0.4.3
+** CI/CD process was moved on GitHub Actions.
+
 * BNF Mode 0.4.2
 ** First release in ELPA.
 
diff --git a/README.org b/README.org
index 5cc6897..7fd5411 100644
--- a/README.org
+++ b/README.org
@@ -1,7 +1,8 @@
 * BNF Mode for GNU Emacs
 
 
[[https://www.gnu.org/licenses/gpl-3.0.txt][https://img.shields.io/badge/license-GPL_3-green.svg]]
-[[https://travis-ci.com/sergeyklay/bnf-mode][https://travis-ci.com/sergeyklay/bnf-mode.svg]]
+[[https://github.com/sergeyklay/bnf-mode/actions][https://github.com/sergeyklay/bnf-mode/workflows/build/badge.svg]]
+[[https://codecov.io/gh/sergeyklay/bnf-mode][https://codecov.io/gh/sergeyklay/bnf-mode/branch/master/graph/badge.svg]]
 [[https://melpa.org/#/bnf-mode][https://melpa.org/packages/bnf-mode-badge.svg]]
 
[[https://stable.melpa.org/#/bnf-mode][https://stable.melpa.org/packages/bnf-mode-badge.svg]]
 
@@ -92,4 +93,4 @@ https://github.com/sergeyklay/bnf-mode/blob/master/NEWS .
 ** License
 
 BNF Mode is open source software licensed under the 
[[https://github.com/sergeyklay/bnf-mode/blob/master/LICENSE][GNU General 
Public Licence version 3]].
-Copyright © 2019, Free Software Foundation, Inc.
+Copyright © 2019-2020, Free Software Foundation, Inc.
diff --git a/bnf-mode.el b/bnf-mode.el
index e8a8679..4fafc88 100644
--- a/bnf-mode.el
+++ b/bnf-mode.el
@@ -1,10 +1,10 @@
 ;;; bnf-mode.el --- Major mode for editing BNF grammars. -*- lexical-binding: 
t; -*-
 
-;; Copyright (C) 2019 Free Software Foundation, Inc
+;; Copyright (C) 2019-2020 Free Software Foundation, Inc
 
-;; Author: Serghei Iakovlev <address@hidden>
-;; Maintainer: Serghei Iakovlev <address@hidden>
-;; Version: 0.4.2
+;; Author: Serghei Iakovlev <address@hidden>
+;; Maintainer: Serghei Iakovlev <address@hidden>
+;; Version: 0.4.3
 ;; URL: https://github.com/sergeyklay/bnf-mode
 ;; Keywords: languages
 ;; Package-Requires: ((cl-lib "0.5") (emacs "24.3"))
diff --git a/test/bnf-mode-font-test.el b/test/bnf-mode-font-test.el
index fb03292..bb3991b 100644
--- a/test/bnf-mode-font-test.el
+++ b/test/bnf-mode-font-test.el
@@ -1,10 +1,10 @@
 ;;; bnf-mode-font-test.el --- BNF Mode: Font highlighting test suite -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2019 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2020 Free Software Foundation, Inc.
 
-;; Author: Serghei Iakovlev <address@hidden>
-;; Maintainer: Serghei Iakovlev <address@hidden>
-;; Version: 0.4.2
+;; Author: Serghei Iakovlev <address@hidden>
+;; Maintainer: Serghei Iakovlev <address@hidden>
+;; Version: 0.4.3
 ;; URL: https://github.com/sergeyklay/bnf-mode
 
 ;;;; License
diff --git a/test/test-helper.el b/test/test-helper.el
index a4fcc3a..a3f5204 100644
--- a/test/test-helper.el
+++ b/test/test-helper.el
@@ -1,10 +1,10 @@
 ;;; test-helper.el --- BNF Mode: Non-interactive unit-test setup -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2019 Free Software Foundation, Inc
+;; Copyright (C) 2019-2020 Free Software Foundation, Inc
 
-;; Author: Serghei Iakovlev <address@hidden>
-;; Maintainer: Serghei Iakovlev <address@hidden>
-;; Version: 0.4.2
+;; Author: Serghei Iakovlev <address@hidden>
+;; Maintainer: Serghei Iakovlev <address@hidden>
+;; Version: 0.4.3
 ;; URL: https://github.com/sergeyklay/bnf-mode
 
 ;;;; License
@@ -34,7 +34,12 @@
 (message "Running tests on Emacs %s" emacs-version)
 
 (when (require 'undercover nil t)
-  (undercover "bnf-mode.el"))
+  ;; Track coverage, but don't send to coveralls. Save in parent
+  ;; directory as undercover saves paths relative to the repository
+  ;; root.
+  (undercover "*.el"
+              (:report-file "coverage-final.json")
+              (:send-report nil)))
 
 (let* ((current-file (if load-in-progress load-file-name (buffer-file-name)))
        (source-directory (locate-dominating-file current-file "Cask"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]