Created
April 19, 2024 11:55
-
-
Save zviryatko/4b0e5474022d97f6439db9d4c949a36f to your computer and use it in GitHub Desktop.
github
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: automated-tests | |
# only manual run | |
on: | |
workflow_dispatch: | |
jobs: | |
automated-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v2 | |
- name: Prepare directories | |
run: | | |
cp .env.dist .env | |
GID=$(id -g) | |
sed -i "s/WWW_DATA_UID=1000/WWW_DATA_UID=${UID}/g" .env | |
sed -i "s/WWW_DATA_GID=1000/WWW_DATA_GID=${GID}/g" .env | |
cp docroot/sites/default/settings.local.php.dist docroot/sites/default/settings.local.php | |
- name: Setup docker containers | |
run: make up | |
- name: Containers info | |
run: make ps | |
- name: Install the website. | |
run: make install | |
- name: Selenium check | |
run: | | |
docker compose exec selenium bash -c 'curl -vvv -I http://app/' | |
- name: Run phpunit | |
run: make test | |
- name: Publish screenshots | |
if: failure() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: screenshots | |
path: test/results/screenshots | |
retention-days: 7 | |
if-no-files-found: ignore | |
- name: Logs | |
if: failure() | |
run: docker compose logs --no-color |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment