This repository has been archived by the owner on Nov 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
142 lines (140 loc) · 5.19 KB
/
Daily-checklist.yaml
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: Mock API Server
on:
schedule:
- cron: '00 20 * * *'
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
Mock-API-Node-AMD64:
strategy:
matrix:
nv: ["14", "16", "17", "18", "19"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the Docker image Nodejs ${{ matrix.nv }}
run: docker-compose -f "docker-compose.yml" up -d --build
env:
NODEJS_VERSION: ${{ matrix.nv }}
APP_CODE_PATH_HOST: /tmp/app/
- name: Node and NPM version check
run: |
docker exec mock-api-server_nodejs_1 node -v
docker exec mock-api-server_nodejs_1 npm -v
- name: API checking
run: |
sleep 30s
curl -i http://localhost:3000/v1/users
- name: Destroy container and file
run: |
docker-compose down
sudo rm -rf /tmp/app/
echo "y" | docker image prune -a
- name: Create ENV
env:
ENV_TEST: ${{ secrets.ENV_TEST }}
run: |
echo "$ENV_TEST" > .env.test
shell: bash
- name: Notify on SUCCESS
if: ${{ SUCCESS() }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notification_title: "{emoji} *{job}* has {status_message}"
message_format: "*{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
footer: "Linked Repo <{repo_url}|{repo}>"
mention_users: "D056LFW47NF,"
mention_users_when: "SUCCESS"
mention_groups: "C06H0SB11JL"
mention_groups_when: "SUCCESS"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_SUCCESS }}
- name: Notify on FAIL
if: ${{ failure() }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notification_title: "{emoji} *{job}* has {status_message}"
message_format: "*{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
footer: "Linked Repo <{repo_url}|{repo}>"
mention_users: "D056LFW47NF"
mention_users_when: "failure,warnings"
mention_groups: "C06G95T1YH3"
mention_groups_when: "failure,warnings"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FAIL }}
Mock-API-Node-ARM64:
strategy:
matrix:
nv: ["14", "16", "17", "18", "19"]
runs-on: ubuntu-22.04
name: Mock-API-Node-ARM64
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2
name: Run commands
id: runcmd
with:
arch: aarch64
distro: ubuntu22.04
run: |
uname -a
echo ::set-output name=uname::$(uname -a)
- name: Get the output
run: |
echo "The uname output was ${{ steps.runcmd.outputs.uname }}"
- name: Build the Docker image Nodejs ${{ matrix.nv }}
run: docker-compose -f "docker-compose.yml" up -d --build
env:
NODEJS_VERSION: ${{ matrix.nv }}
APP_CODE_PATH_HOST: /tmp/app/
- name: Node and NPM version check
run: |
docker exec mock-api-server_nodejs_1 node -v
docker exec mock-api-server_nodejs_1 npm -v
- name: API checking
run: |
sleep 30s
curl -i http://localhost:3000/v1/users
- name: Destroy container and file
run: |
docker-compose down
sudo rm -rf /tmp/app/
echo "y" | docker image prune -a
- name: Create ENV
env:
ENV_TEST: ${{ secrets.ENV_TEST }}
run: |
echo "$ENV_TEST" > .env.test
shell: bash
- name: Notify on SUCCESS
if: ${{ SUCCESS() }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notification_title: "{emoji} *{job}* has {status_message}"
message_format: "*{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
footer: "Linked Repo <{repo_url}|{repo}>"
mention_users: "D056LFW47NF,"
mention_users_when: "SUCCESS"
mention_groups: "C06H0SB11JL"
mention_groups_when: "SUCCESS"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_SUCCESS }}
- name: Notify on FAIL
if: ${{ failure() }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notification_title: "{emoji} *{job}* has {status_message}"
message_format: "*{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
footer: "Linked Repo <{repo_url}|{repo}>"
mention_users: "D056LFW47NF"
mention_users_when: "failure,warnings"
mention_groups: "C06G95T1YH3"
mention_groups_when: "failure,warnings"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FAIL }}