Skip to content

Commit

Permalink
Rewrite Syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed May 12, 2023
1 parent f65fc90 commit d0e6aa4
Show file tree
Hide file tree
Showing 13 changed files with 3,868 additions and 1,371 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/.github/ export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
*.cmd export-ignore
*.png export-ignore
83 changes: 83 additions & 0 deletions .github/workflows/ci-syntax-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: CI Syntax Tests

on:
push:
push:
- '**'
paths:
- '.github/workflows/ci-syntax-tests.yml'
- '**.sublime-syntax'
- '**/syntax_test_*'
- '**.tmPreferences'
pull_request:
branches:
- '**'
paths:
- '.github/workflows/ci-syntax-tests.yml'
- '**.sublime-syntax'
- '**/syntax_test_*'
- '**.tmPreferences'
workflow_dispatch:

jobs:
syntax_tests:
name: Sublime Text ${{ matrix.build }}
runs-on: ubuntu-latest
timeout-minutes: 15 # default is 6 hours!
strategy:
matrix:
include:
- build: 4126
default_packages: v4126
- build: 4143
default_packages: v4143
- build: latest # latest available ST build
default_packages: master
steps:
- name: Checkout Default Packages
uses: actions/checkout@v3
with:
repository: sublimehq/Packages
ref: ${{ matrix.default_packages }}
path: st_syntax_tests/Data/Packages

- name: Delete default package tests
run: |-
find st_syntax_tests/Data/Packages/*/ -type f -name 'syntax_test*' -exec rm -v '{}' \;
- name: Prepare dummy syntaxes
run: |-
packages=st_syntax_tests/Data/Packages
scopes=(
source.less
source.sass
source.scss
source.stylus
)
mkdir -vp "$packages/Default"
for scope in ${scopes[@]}; do
cat << SYNTAX > "$packages/Default/$scope.sublime-syntax"
%YAML 1.2
---
scope: $scope
contexts:
main: []
SYNTAX
done
- name: Checkout MDX
uses: actions/checkout@v3
with:
path: st_syntax_tests/Data/Packages/MDX

- name: Run Syntax Tests for Sublime Text ${{ matrix.build }}
run: |-
if [[ "${{ matrix.build }}" == "latest" ]]; then
wget -O st_syntax_tests.tar.xz https://download.sublimetext.com/latest/dev/linux/x64/syntax_tests
else
wget -O st_syntax_tests.tar.xz https://download.sublimetext.com/st_syntax_tests_build_${{ matrix.build }}_x64.tar.xz
fi
tar xf st_syntax_tests.tar.xz
cd st_syntax_tests
./syntax_tests
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
.DS_Store
*.cmd
Loading

0 comments on commit d0e6aa4

Please sign in to comment.