name: elisp_tests on: schedule: # Every 4 hours - cron: '0 */4 * * *' pull_request: push: branches: - master - develop env: 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" defaults: run: shell: bash jobs: test: if: ${{ github.event_name != 'schedule' }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] emacs_version: [25.3, 26.3, 27.1, snapshot] test_root: - core - layers/+distribution/spacemacs-base - layers/+distribution/spacemacs steps: - name: Install Emacs on UNIX uses: purcell/setup-emacs@master with: version: ${{ matrix.emacs_version }} 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' }} - 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 }} - uses: actions/checkout@v2 - name: Dependencies installation run: ${{ env.TEST_SCRIPT }} ${{ matrix.test_root }} installation - name: Unit testing run: ${{ env.TEST_SCRIPT }} ${{ matrix.test_root }} unit_tests - name: Functional testing run: ${{ env.TEST_SCRIPT }} ${{ matrix.test_root }} func_tests update_elpa_mirror: 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 }}