feature/DLT-29-update-github-action #24
Workflow file for this run
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: CI Build | |
on: | |
push: | |
branches: [ "master", "development" ] | |
pull_request: | |
branches: [ "master", "development" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Docker Login | |
env: | |
DOCKER_USER: ${{ secrets.DOCKER_USER }} | |
DOCKER_KEY: ${{ secrets.DOCKER_KEY }} | |
run: | | |
docker login -u $DOCKER_USER -p $DOCKER_KEY | |
# Script Permissions | |
- name: Setting up Permissions | |
run: | | |
chmod +x -R ./scripts/*.sh | |
mkdir -p ./storage/logs/ ./bootstrap/cache/ | |
chmod 777 ./storage/ ./bootstrap/cache -R | |
# Docker Images | |
- name: Building the Docker Images | |
run: ./scripts/build.sh | |
# Docker Containers | |
- name: Start Docker Containers | |
run: ./scripts/up.sh -d | |
# Composer | |
- name: Run Composer | |
run: | | |
./scripts/composer.sh install | |
./scripts/composer.sh dump-autoload | |
./scripts/composer.sh run post-root-package-install | |
./scripts/composer.sh run post-create-project-cmd | |
# NPM | |
- name: Run NPM | |
run: | | |
./scripts/run.sh npm install --loglevel=error | |
./scripts/run.sh npm run development | |
# Code Quality Check | |
- name: Run PhpStan | |
run: ./scripts/composer.sh run phpstan | |
- name: Run Easy Coding Sandards | |
run: ./scripts/composer.sh run ecs-all | |
- name: Run Automated Test with PhpUnit | |
run: ./scripts/composer.sh run phpunit | |
# Teardown | |
- name: Stop container and remove images | |
run: ./scripts/down.sh -v |