Skip to content

Commit

Permalink
CI: Copy workflow from Astro
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Nov 22, 2024
1 parent 8925ec5 commit 1ebd12a
Showing 1 changed file with 40 additions and 6 deletions.
46 changes: 40 additions & 6 deletions .github/workflows/syntax-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@ name: CI Syntax Tests
on:
push:
branches:
- '**'
- 'master'
tags-ignore:
- '**'
paths:
- '.github/workflows/syntax-tests.yml'
- '.github/workflows/ci-syntax-tests.yml'
- '**.sublime-syntax'
- '**/syntax_test_*'
- '**.tmPreferences'
pull_request:
paths:
- '.github/workflows/ci-syntax-tests.yml'
- '**.sublime-syntax'
- '**/syntax_test_*'
- '**.tmPreferences'
Expand All @@ -19,17 +25,45 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15 # default is 6 hours!
strategy:
fail-fast: false
matrix:
include:
# Stable ST4 builds
- build: 4143
default_packages: v4143
- build: 4152
default_packages: v4152
- build: 4169
default_packages: v4169
- build: 4180
default_packages: v4180
# Latest dev build
- build: latest
default_packages: master
steps:
- uses: actions/checkout@v4
- uses: SublimeText/syntax-test-action@v2
- name: Checkout Default Packages
uses: actions/checkout@v4
with:
build: ${{ matrix.build }}
default_packages: ${{ matrix.default_packages }}
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: Checkout CoffeeScript
uses: actions/checkout@v4
with:
path: st_syntax_tests/Data/Packages/CoffeeScript

- 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

0 comments on commit 1ebd12a

Please sign in to comment.