Skip to content

Commit

Permalink
[meta] run syntax_tests in parallel on dev and (optionally) `stab…
Browse files Browse the repository at this point in the history
…le` Builds (sublimehq#3090)

* [meta] update github action workflow

to run parallel tests with latest stable & dev channel syntax_tests
binary

* [meta] use Build 4118 test binary

* [meta] update displayed names of workflow jobs

* [meta] minor readability improvements of workflow

* [meta] add ability to run workflow on dispatch

This adds a button to workflow history page at:
<https://github.com/sublimehq/Packages/actions/workflows/ci.yml>

* [meta] improve labeling of workflow

via `matrix.include`

Co-authored-by: michaelblyons <[email protected]>

* [meta] merge steps in workflow for:

- creating subdir
- moving root dirs into it

* [meta] optionally run workflow on stable builds

Co-authored-by: Keith Hall <[email protected]>

Co-authored-by: michaelblyons <[email protected]>
Co-authored-by: Keith Hall <[email protected]>
  • Loading branch information
3 people authored Oct 19, 2021
1 parent bf03198 commit 258ace9
Showing 1 changed file with 30 additions and 20 deletions.
50 changes: 30 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: CI
name: ci

on:
push:
branches:
Expand All @@ -22,31 +23,40 @@ on:
- '**/*.tmLanguage'
- '**/*.tmPreferences'
- '.github/workflows/ci.yml'
workflow_dispatch:

jobs:
build:
name: Run syntax_tests
runs-on: ubuntu-18.04
run_syntax_tests:
name: Test syntaxes on Build ${{ matrix.sublime-build }} (${{ matrix.sublime-channel }})
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.optional }}
strategy:
max-parallel: 2
fail-fast: false
matrix:
include:
- sublime-channel: stable
sublime-build: 4113
optional: true
- sublime-channel: dev
sublime-build: 4118
optional: false
steps:
- uses: actions/checkout@master

- name: Download syntax_tests
run: wget -O st_syntax_tests.tar.xz https://download.sublimetext.com/st_syntax_tests_build_4116_x64.tar.xz

- name: Extract syntax_tests
run: tar xf st_syntax_tests.tar.xz

- name: Move syntax_tests
run: mv st_syntax_tests/* ./

- name: Cleanup syntax_tests archive
run: rm -R st_syntax_tests st_syntax_tests.tar.xz
- name: Git checkout
uses: actions/checkout@master

- name: Setup Data/Packages/
run: mkdir -p Data/Packages/
- name: Get binary for Build ${{ matrix.sublime-build }} (${{ matrix.sublime-channel }})
run: |
wget -O st_syntax_tests.tar.xz https://download.sublimetext.com/st_syntax_tests_build_${{ matrix.sublime-build }}_x64.tar.xz
tar xf st_syntax_tests.tar.xz
mv st_syntax_tests/* ./
rm -R st_syntax_tests st_syntax_tests.tar.xz
- name: Move packages into Data dir
run: find . -maxdepth 1 -mindepth 1 -type d -not -name 'Data' -exec mv '{}' Data/Packages/ ';'
- name: 'Move root dirs into "Data/Packages/" subdir'
run: |
mkdir -p Data/Packages/
find . -maxdepth 1 -mindepth 1 -type d -not -name 'Data' -exec mv '{}' Data/Packages/ ';'
- name: Run syntax tests
run: ./syntax_tests

0 comments on commit 258ace9

Please sign in to comment.