-
Notifications
You must be signed in to change notification settings - Fork 42
78 lines (65 loc) · 2.63 KB
/
test.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
REPORT_ADDR: http://120.92.110.224:8081
jobs:
megatron-unit-test:
runs-on: self-hosted
container:
image: localhost:5000/flagscale_cicd:v1.3
ports:
- 80
volumes:
- /home/flagscale_cicd/flask/static:/workspace/report
- /home/flagscale_cicd/docker/docker_build/docker_data:/home/gitlab-runner/data
- /home/flagscale_cicd/docker/docker_build/docker_tokenizers:/home/gitlab-runner/tokenizers
options: --gpus all --hostname flagscale_cicd
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Megatron Unit Test
run: tests/scripts/unit_test_megatron.sh ${{github.sha}}
- name: Megatron Unit Test Coverage Online Report
run: echo "You can access the test coverage report at the $REPORT_ADDR/${{github.sha}}/cov-report-megatron/index.html"
flagscale-unit-test:
runs-on: self-hosted
needs: megatron-unit-test
container:
image: localhost:5000/flagscale_cicd:v1.3
ports:
- 80
volumes:
- /home/flagscale_cicd/flask/static:/workspace/report
- /home/flagscale_cicd/docker/docker_build/docker_data:/home/gitlab-runner/data
- /home/flagscale_cicd/docker/docker_build/docker_tokenizers:/home/gitlab-runner/tokenizers
options: --gpus all --hostname flagscale_cicd
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Flagscale Unit Test
run: tests/scripts/unit_test_flagscale.sh ${{github.sha}}
- name: Flagscale Unit Test Coverage Online Report
run: echo "You can access the test coverage report at the $REPORT_ADDR/${{github.sha}}/cov-report-flagscale/index.html"
flagscale-functional-test:
runs-on: self-hosted
needs: flagscale-unit-test
container:
image: localhost:5000/flagscale_cicd:v1.3
ports:
- 80
volumes:
- /home/flagscale_cicd/flask/static:/workspace/report
- /home/flagscale_cicd/docker/docker_build/docker_data:/home/gitlab-runner/data
- /home/flagscale_cicd/docker/docker_build/docker_tokenizers:/home/gitlab-runner/tokenizers
options: --gpus all --hostname flagscale_cicd
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Flagscale Functional Test
run: tests/scripts/functional_test_flagscale.sh