-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use SublimeText/syntax-test-action for CI
- Loading branch information
1 parent
c1bcc4f
commit f7059c1
Showing
1 changed file
with
19 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,29 @@ | ||
name: CI | ||
name: Syntax Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
tags-ignore: | ||
- '*' | ||
paths: | ||
- '**.sublime-syntax' | ||
- '**/syntax_test*' | ||
- '**.tmPreferences' | ||
pull_request: | ||
branches: | ||
- '*' | ||
paths: | ||
- '**.sublime-syntax' | ||
- '**/syntax_test*' | ||
- '**.tmPreferences' | ||
|
||
jobs: | ||
build: | ||
name: Run syntax_tests (${{ matrix.st.name }}) | ||
syntax_tests: | ||
name: Syntax Tests (${{ matrix.build }}) | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 # default is 6 hours! | ||
strategy: | ||
matrix: | ||
st: | ||
- name: Latest Sublime Text | ||
url: https://download.sublimetext.com/latest/dev/linux/x64/syntax_tests | ||
test_directory: st_syntax_tests | ||
- name: Sublime Text 3 | ||
url: https://download.sublimetext.com/st3_syntax_tests_build_3211_x64.tar.bz2 | ||
test_directory: st3_syntax_tests | ||
include: | ||
- build: latest # Latest dev build | ||
- build: 4169 # Oldest stable version we intent to support | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/checkout@v3 | ||
- uses: SublimeText/syntax-test-action@v2 | ||
with: | ||
path: Terraform | ||
|
||
- name: Download syntax_tests | ||
run: wget -O ${{ matrix.st.test_directory }}.tar.xz ${{ matrix.st.url }} | ||
|
||
- name: Extract syntax_tests | ||
run: tar xf ${{ matrix.st.test_directory }}.tar.xz | ||
|
||
- name: Setup package directory | ||
run: mkdir -p ./${{ matrix.st.test_directory }}/Data/Packages | ||
|
||
- name: Move package files to Packages dir | ||
run: mv Terraform ./${{ matrix.st.test_directory }}/Data/Packages/ | ||
|
||
- name: Move syntax_tests | ||
run: mv ${{ matrix.st.test_directory }}/* ./ | ||
|
||
- name: Cleanup syntax_tests archive | ||
run: rm -R ${{ matrix.st.test_directory }} ${{ matrix.st.test_directory }}.tar.xz | ||
|
||
- name: Run syntax tests | ||
run: ./syntax_tests | ||
build: ${{ matrix.build }} |