Skip to content

Commit

Permalink
workflow: self test
Browse files Browse the repository at this point in the history
  • Loading branch information
rumblefrog committed Nov 16, 2019
1 parent e88cc01 commit 4757c18
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
lib/* linguist-vendored
node_modules/* linguist-vendored
__tests__/* linguist-vendored
26 changes: 26 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand Down
9 changes: 9 additions & 0 deletions __tests__/compile.sp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <sourcemod>

#pragma semicolon 1
#pragma newdecls required

public void OnPluginStart()
{
PrintToServer("Hello, World!");
}

0 comments on commit 4757c18

Please sign in to comment.