From 283b61790d01f81b1b77c83880d20728be8070d6 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Thu, 30 May 2024 02:01:31 +0200 Subject: [PATCH] feat: CI for tests! Closes #4 --- .github/workflows/ci.yml | 57 ++++++++++++++++++++++++++++++++++++++++ images/.gitkeep | 1 - 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 images/.gitkeep diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4a61d0c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,57 @@ +name: CI on Pull Requests and Pushes + +on: + push: + branches: ["main"] + paths-ignore: + - LICENSE + - '*.md' + - .github/media/** + pull_request: + branches: ["main"] + paths-ignore: + - LICENSE + - '*.md' + - .github/media/** + +# Setup the version of Sublime to test against +env: + SUBLIME_BUILD: 4169 + +# Allow one concurrent deployment +concurrency: + group: ${{github.workflow}}-${{github.ref}} + cancel-in-progress: false + +# Only in bash +defaults: + run: + shell: bash + +jobs: + syntax-tests: + # Reference: + # https://github.com/sublimehq/Packages/blob/master/.github/workflows/ci.yml + # https://github.com/digitalcora/sublime-text-gleam/blob/main/.github/workflows/ci.yml + name: Syntax tests + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + + - uses: actions/cache@v4 + id: st-cache + with: + path: ~/sublime + key: st-${{ env.SUBLIME_BUILD }} + + - if: '!steps.st-cache.outputs.cache-hit' + run: > + mkdir -p ~/.sublime + && curl -L https://download.sublimetext.com/st_syntax_tests_build_${{ env.SUBLIME_BUILD }}_x64.tar.xz + | tar Jvx -C ~/.sublime --strip-components 1 + + - run: |- + mkdir ~/.sublime/Data/Packages/Tact + mv package tests ~/.sublime/Data/Packages/Tact/ + ~/.sublime/syntax_tests diff --git a/images/.gitkeep b/images/.gitkeep deleted file mode 100644 index 8b13789..0000000 --- a/images/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -