-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (46 loc) · 1.31 KB
/
weather-app-ci-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Weather App CI
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: Add Permission to Shell Scripts
run: chmod +x -R ./scripts/*.sh
# 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
# NPM
- name: Run NPM
run: |
./scripts/run.sh npm install
./scripts/run.sh npm run build
# 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