Skip to content

Commit 60e488e

Browse files
committed
Run CI tests on any branch
1 parent c60c516 commit 60e488e

File tree

2 files changed

+49
-2
lines changed

2 files changed

+49
-2
lines changed

.github/workflows/ci.yml renamed to .github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Build
22

33
on:
44
push:
@@ -9,7 +9,7 @@ on:
99
- main
1010

1111
jobs:
12-
build-and-test:
12+
test-and-build:
1313
runs-on: ubuntu-24.04
1414

1515
steps:

.github/workflows/test.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
pull_request:
7+
branches:
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-24.04
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Get Composer Cache Directory
17+
id: composer-cache
18+
run: |
19+
echo "cache_dir=$(composer config cache-files-dir)" >> $GITHUB_ENV
20+
21+
- uses: actions/cache@v4
22+
with:
23+
path: ${{ env.cache_dir }}
24+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
25+
restore-keys: |
26+
${{ runner.os }}-composer-
27+
28+
- name: Install dependencies
29+
run: |
30+
composer install --no-dev --no-interaction --no-scripts
31+
32+
- name: Run PHPUnit tests
33+
run: |
34+
composer install --no-interaction --no-scripts
35+
./scripts/test/unit.sh
36+
37+
- name: Set up Go
38+
uses: actions/setup-go@v4
39+
with:
40+
go-version: 1.22
41+
cache-dependency-path: cli/go.sum
42+
43+
- name: Run integration tests
44+
run: |
45+
export TEST_CLI_PATH=$(realpath "./bin/platform")
46+
cd go-tests
47+
go test ./... -v

0 commit comments

Comments
 (0)