feat(ci): add GitHub Actions workflow for testing and Docker builds #20
@@ -19,9 +19,6 @@ jobs:
|
|||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
# type=gha depends on act_runner's internal cache proxy, which is unreachable
|
|
||||||
# from job containers on this runner (dial tcp ... i/o timeout). Use the
|
|
||||||
# registry cache backend instead, same as docker-publish.yml.
|
|
||||||
- name: Log in to Gitea registry
|
- name: Log in to Gitea registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
@@ -46,6 +43,7 @@ jobs:
|
|||||||
name: graph-dev-image
|
name: graph-dev-image
|
||||||
path: /tmp/graph-dev.tar
|
path: /tmp/graph-dev.tar
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
build-prod:
|
build-prod:
|
||||||
needs: build-dev
|
needs: build-dev
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -77,11 +75,13 @@ jobs:
|
|||||||
name: graph-dev-image
|
name: graph-dev-image
|
||||||
path: /tmp
|
path: /tmp
|
||||||
|
|
||||||
- name: Load dev image
|
- name: Load dev image
|
||||||
run: docker load --input /tmp/graph-dev.tar
|
run: docker load --input /tmp/graph-dev.tar
|
||||||
|
|
||||||
- name: Run PHPUnit
|
- name: Run tests in dev image
|
||||||
run: docker run --rm -v "$(pwd)":/app -v /app/vendor graph-dev:ci vendor/bin/phpunit --testdox
|
run: |
|
||||||
|
docker run --rm -v "$(pwd)":/app -v /app/vendor graph-dev:ci sh -c "
|
||||||
- name: Run PHPStan
|
composer install --no-interaction &&
|
||||||
run: docker run --rm -v "$(pwd)":/app -v /app/vendor graph-dev:ci composer phpstan
|
vendor/bin/phpunit --testdox &&
|
||||||
|
composer phpstan
|
||||||
|
"
|
||||||
|
|||||||
Reference in New Issue
Block a user