-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test and run in GitHub Actions
- Loading branch information
1 parent
82e5163
commit 4c96566
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: CI | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
run-tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
st-version: [3, 4] | ||
os: ["ubuntu-latest", "macOS-latest", "windows-latest"] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: SublimeText/UnitTesting/actions/setup@v1 | ||
with: | ||
package-name: Phpcs | ||
sublime-text-version: ${{ matrix.st-version }} | ||
- uses: SublimeText/UnitTesting/actions/run-tests@v1 | ||
# with: | ||
# coverage: true | ||
# - uses: codecov/codecov-action@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import os | ||
import re | ||
import sys | ||
import sublime | ||
|
||
|
||
from unittesting import ( | ||
AWAIT_WORKER, | ||
DeferrableTestCase, | ||
) | ||
from Phpcs.phpcs import Sniffer | ||
|
||
|
||
class TestDiffViewInternalFunctions(DeferrableTestCase): | ||
def test_something(self): | ||
php_path = "/bin/php" | ||
s = sublime.load_settings("phpcs.sublime-settings") | ||
s.set("phpcs_php_prefix_path", php_path) | ||
|
||
args = Sniffer().get_executable_args() | ||
self.assertIn(php_path, args) |