Add GH actions to run tests on dev only & disable travis on dev

This commit is contained in:
Bubka 2022-04-04 14:21:46 +02:00
parent 8590f55546
commit 4dd8a2df90
2 changed files with 46 additions and 1 deletions

45
.github/workflows/phpunit.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: phpunit
on:
push:
branches:
- dev
paths:
- .github/workflows/phpunit.yml
- app/**
- bootstrap/**
- config/**
- database/**
- docker/**
- public/**
- resources/**
- routes/**
- storage/**
- tests/**
- .dockerignore
- .env.travis
- artisan
- composer.json
- composer.lock
- Dockerfile
- phpunit.xml
- server.php
jobs:
verify:
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: "1"
steps:
- uses: actions/checkout@v2.3.4
- name: Build test image
run: docker build --target test -t test-container .
- name: Run tests in test container
run: |
touch coverage.txt
docker run --rm \
test-container
- name: Build final image
run: docker build .

View File

@ -35,4 +35,4 @@ after_success:
branches: branches:
only: only:
- master - master
- dev # - dev