From 4757c183b32b07efb11fdb209aa4e50f9d37e681 Mon Sep 17 00:00:00 2001 From: rumblefrog Date: Sat, 16 Nov 2019 01:44:25 -0500 Subject: [PATCH] workflow: self test --- .gitattributes | 1 + .github/workflows/workflow.yml | 26 ++++++++++++++++++++++++++ README.md | 4 +++- __tests__/compile.sp | 9 +++++++++ 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/workflow.yml create mode 100644 __tests__/compile.sp diff --git a/.gitattributes b/.gitattributes index ff05a6a..2cefde3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,3 @@ lib/* linguist-vendored node_modules/* linguist-vendored +__tests__/* linguist-vendored diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..ee22445 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,26 @@ +name: Main Workflow + +on: [push] + +jobs: + run: + name: Run action + runs-on: ${{ matrix.operating-systems }} + strategy: + matrix: + operating-systems: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - uses: actions/checkout@v1 + + - name: Setup SourcePawn Compiler + uses: rumblefrog/setup-sp@master + with: + version: "1.11.x" + + # For some reason, mac compiler doesn't use the include directory in which the compiler is in + - name: Verify compiler + run: | + which spcomp + echo $includePath + spcomp -i$includePath __tests__/compile.sp diff --git a/README.md b/README.md index a1ea013..f72297f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Setup SourcePawn Action +![](https://github.com/rumblefrog/setup-sp/workflows/Main%20Workflow/badge.svg) + This action sets-up, cache and adds sourcemod scripting directory to the path # Usage @@ -27,7 +29,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - sm-version: [ '1.10.x', '1.11.x', '1.11.6467'] + sm-version: [ '1.10.x', '1.11.x', '1.11.6467', '>= 1.11.6478'] name: SM version ${{ matrix.sm-version }} steps: diff --git a/__tests__/compile.sp b/__tests__/compile.sp new file mode 100644 index 0000000..efb7b13 --- /dev/null +++ b/__tests__/compile.sp @@ -0,0 +1,9 @@ +#include + +#pragma semicolon 1 +#pragma newdecls required + +public void OnPluginStart() +{ + PrintToServer("Hello, World!"); +}