Skip to content

Commit

Permalink
Replace Travis tests with GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
PineappleIOnic committed Feb 16, 2024
1 parent 8cb4bcb commit a88e5dc
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 25 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Tests"

on: [pull_request]
jobs:
test:
name: Unit Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
services:
[
Plausible,
GoogleAnalytics,
HubSpot,
Orbit
]

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2

- run: git checkout HEAD^2

- name: Run ${{matrix.services}} Tests
run: |
docker run --rm -v $PWD:/app composer sh -c \
"composer install --ignore-platform-reqs && composer test -- --filter ${{matrix.services}}"
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

24 changes: 12 additions & 12 deletions tests/Analytics/AnalyticsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function setUp(): void
}

/**
* @group plausible
* @group Plausible
*/
public function testPlausible()
{
Expand All @@ -58,7 +58,7 @@ public function testPlausible()
}

/**
* @group hubspot
* @group HubSpot
*/
public function testHubSpotCreateContact()
{
Expand All @@ -68,7 +68,7 @@ public function testHubSpotCreateContact()
}

/**
* @group hubspot
* @group HubSpot
*
* @depends testHubSpotCreateContact
*/
Expand Down Expand Up @@ -99,7 +99,7 @@ public function testHubSpotGetContact()
}

/**
* @group hubspot
* @group HubSpot
*
* @depends testHubSpotGetContact
*/
Expand All @@ -113,7 +113,7 @@ public function testHubSpotCreateAccount($data)
}

/**
* @group hubspot
* @group HubSpot
*
* @depends testHubSpotCreateAccount
*/
Expand Down Expand Up @@ -146,7 +146,7 @@ public function testHubSpotGetAccount($data)
/**
* @depends testHubSpotGetAccount
*
* @group hubspot
* @group HubSpot
*/
public function testHubSpotSyncAsociation($data)
{
Expand All @@ -159,7 +159,7 @@ public function testHubSpotSyncAsociation($data)
/**
* @depends testHubSpotSyncAsociation
*
* @group hubspot
* @group HubSpot
*/
public function testHubSpotUpdateContact($data)
{
Expand All @@ -171,7 +171,7 @@ public function testHubSpotUpdateContact($data)
/**
* @depends testHubSpotUpdateContact
*
* @group hubspot
* @group HubSpot
*/
public function testHubSpotDeleteContact($data)
{
Expand All @@ -183,7 +183,7 @@ public function testHubSpotDeleteContact($data)
/**
* @depends testHubSpotDeleteContact
*
* @group hubspot
* @group HubSpot
*/
public function testHubSpotUpdateAccount($data)
{
Expand All @@ -200,15 +200,15 @@ public function testHubSpotUpdateAccount($data)
/**
* @depends testHubSpotUpdateAccount
*
* @group hubspot
* @group HubSpot
*/
public function testHubSpotDeleteAccount($data)
{
$this->assertTrue($this->hs->deleteAccount($data['accountID']));
}

/**
* @group orbit
* @group Orbit
*/
public function testOrbit(): void
{
Expand All @@ -223,7 +223,7 @@ public function testOrbit(): void
}

/**
* @group hubspot
* @group HubSpot
*/
public function testCleanup(): void
{
Expand Down

0 comments on commit a88e5dc

Please sign in to comment.