Skip to content

Commit

Permalink
combined test
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcdawkins committed Nov 23, 2024
1 parent 8834900 commit 4bc8d9d
Showing 1 changed file with 14 additions and 22 deletions.
36 changes: 14 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
- pull_request

jobs:
build:
build-and-test:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -41,26 +41,6 @@ jobs:
CI_COMMIT_SHORT_SHA=$(echo $CI_COMMIT_SHA | head -c8)
./bin/platform self:build --no-composer-rebuild --yes --replace-version "$CI_COMMIT_REF_NAME"-"$CI_COMMIT_SHORT_SHA" --output platform.phar
- uses: actions/upload-artifact@v4
with:
name: cli-phar
path: platform.phar

# TODO run these when upgraded for PHP 8+ compatibility
# - name: Run unit tests
# run: |
# # Install PHPUnit
# composer install --no-interaction --no-scripts
# ./scripts/test/unit.sh

test:
runs-on: ubuntu-latest
needs: build

steps:
- name: Download artifact
uses: actions/download-artifact@v4

- name: Clone main CLI repository
run: git clone https://github.com/platformsh/cli.git ./cli

Expand All @@ -70,9 +50,21 @@ jobs:
go-version: 1.22
cache-dependency-path: cli/go.sum

- uses: actions/upload-artifact@v4
with:
name: cli-phar
path: platform.phar

- name: Run integration tests
working-directory: ./cli
run: |
export TEST_CLI_PATH=$(realpath "$PWD/../cli-phar/platform.phar")
export TEST_CLI_PATH=$(realpath "./platform.phar")
chmod +x "$TEST_CLI_PATH"
go test ./tests -v
# TODO run these when upgraded for PHP 8+ compatibility
# - name: Run unit tests
# run: |
# # Install PHPUnit
# composer install --no-interaction --no-scripts
# ./scripts/test/unit.sh

0 comments on commit 4bc8d9d

Please sign in to comment.