spacemacs/.github/workflows/elisp_test.yml

97 lines
2.4 KiB
YAML
Raw Normal View History

2020-09-02 05:28:06 +00:00
name: elisp_tests
2020-08-30 05:00:45 +00:00
on:
2020-09-02 05:28:06 +00:00
schedule:
# Every 4 hours
- cron: '0 */4 * * *'
2020-08-30 05:00:45 +00:00
pull_request:
push:
branches:
- master
- develop
env:
2020-09-02 03:08:23 +00:00
TEST_SCRIPT: ./.github/workflows/scripts/test
MIRROR_SCRIPT: ./.github/workflows/scripts/create_mirror
EM_SCRIPT_PATH: $HOME/elpa-mirror.el
MIRROR_DIR: $HOME/elpa
MIRROR_NAME: elpa-mirror
EM_SCRIPT_URL: "https://raw.githubusercontent.com/\
redguardtoo/\
elpa-mirror/\
master/\
elpa-mirror.el"
2020-08-30 23:27:56 +00:00
defaults:
run:
shell: bash
2020-08-30 05:00:45 +00:00
jobs:
2020-09-02 03:08:23 +00:00
test:
if: ${{ github.event_name != 'schedule' }}
2020-08-30 05:00:45 +00:00
runs-on: ${{ matrix.os }}
strategy:
2020-08-30 23:27:56 +00:00
fail-fast: false
2020-08-30 05:00:45 +00:00
matrix:
2020-08-30 23:27:56 +00:00
os: [ubuntu-latest, macos-latest, windows-latest]
2020-09-03 05:06:13 +00:00
emacs_version: [26.3, 27.1, snapshot]
2020-08-30 05:00:45 +00:00
test_root:
2020-08-30 23:27:56 +00:00
- core
- layers/+distribution/spacemacs-base
- layers/+distribution/spacemacs
2020-08-30 05:00:45 +00:00
steps:
2020-08-30 23:27:56 +00:00
- name: Install Emacs on UNIX
uses: purcell/setup-emacs@master
2020-08-30 05:00:45 +00:00
with:
version: ${{ matrix.emacs_version }}
2020-08-30 23:27:56 +00:00
if: ${{ matrix.os != 'windows-latest' }}
- name: Install Emacs on Windows
uses: jcs090218/setup-emacs-windows@master
with:
version: ${{ matrix.emacs_version }}
if: ${{ matrix.os == 'windows-latest' }}
2020-09-02 03:08:23 +00:00
- name: Download elpa mirror
continue-on-error: true
uses: actions/download-artifact@v2
with:
name: ${{ env.MIRROR_NAME }}
path: ${{ env.MIRROR_DIR }}
- name: List mirror content
continue-on-error: true
run: find ${{ env.MIRROR_DIR }}
2020-08-30 05:00:45 +00:00
- uses: actions/checkout@v2
2020-08-30 23:27:56 +00:00
- name: Dependencies installation
2020-09-02 03:08:23 +00:00
run: ${{ env.TEST_SCRIPT }} ${{ matrix.test_root }} installation
2020-08-30 23:27:56 +00:00
- name: Unit testing
2020-09-02 03:08:23 +00:00
run: ${{ env.TEST_SCRIPT }} ${{ matrix.test_root }} unit_tests
2020-08-30 23:27:56 +00:00
- name: Functional testing
2020-09-02 03:08:23 +00:00
run: ${{ env.TEST_SCRIPT }} ${{ matrix.test_root }} func_tests
2020-09-02 05:28:06 +00:00
update_elpa_mirror:
2020-09-02 03:08:23 +00:00
if: ${{ github.event_name == 'schedule' }}
runs-on: ubuntu-latest
steps:
- name: Install Emacs
uses: purcell/setup-emacs@master
with:
version: 27.1
- name: Download elpa-mirror.el
run: curl -o ${{ env.EM_SCRIPT_PATH }} ${{ env.EM_SCRIPT_URL }}
- uses: actions/checkout@v2
- name: Create local mirror
run: ${{ env.MIRROR_SCRIPT }}
- name: Upload mirror artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.MIRROR_NAME }}
path: ${{ env.MIRROR_DIR }}