Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 75b2fd6

Browse files
committed
ci(actions): re-org into one job
1 parent 002be11 commit 75b2fd6

File tree

1 file changed

+17
-30
lines changed

1 file changed

+17
-30
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [master, dev]
88

99
jobs:
10-
setup-backend-server:
10+
e2e-test:
1111
name: Setup Backend Server
1212
runs-on: ubuntu-latest
1313
services:
@@ -22,71 +22,58 @@ jobs:
2222
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
2323

2424
steps:
25-
- name: checkout
25+
- name: (Backend) checkout codebase
2626
uses: actions/checkout@v2
2727
with:
2828
fetch-depth: 0
2929
repository: 'coderplanets/coderplanets_server'
30-
# Relative path under $GITHUB_WORKSPACE to place the repository
3130
path: 'backend_server'
32-
- name: Set up Elixir and OTP
31+
- name: (Backend) Setup Elixir and OTP
3332
uses: actions/setup-elixir@v1
3433
with:
3534
elixir-version: '1.10.3' # Define the elixir version [required]
3635
otp-version: '22.3' # Define the OTP version [required]
37-
- name: Restore dependencies cache
36+
- name: (Backend) Restore dependencies cache
3837
uses: actions/cache@v2
3938
with:
4039
path: deps
4140
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
4241
restore-keys: ${{ runner.os }}-mix-
43-
- name: deps.get
42+
- name: (Backend) Install Packages
4443
working-directory: ./backend_server
4544
run: mix deps.get > /dev/null
46-
- name: set up test server
45+
- name: (Backend) set up test DB
4746
working-directory: ./backend_server
4847
run: MIX_ENV=ci mix ecto.setup > /dev/null
49-
- name: seed test data
48+
- name: (Backend) seed data into DB
5049
working-directory: ./backend_server
5150
run: MIX_ENV=ci mix run priv/mock/cps_seeds.exs > /dev/null
52-
- name: ls dir
53-
run: ls
54-
- name: Run Backend Server
51+
- name: (Backend) Run Server
5552
working-directory: ./backend_server
5653
run: MIX_ENV=ci mix phx.server &
5754

58-
setup-front:
59-
name: Setup Web Front
60-
runs-on: ubuntu-latest
61-
needs: setup-backend-server
62-
steps:
63-
- uses: actions/checkout@v2
55+
- name: (Frontend) checkout codebase
56+
uses: actions/checkout@v2
6457
with:
6558
fetch-depth: 0
6659
repository: 'coderplanets/coderplanets_web'
67-
# Relative path under $GITHUB_WORKSPACE to place the repository
6860
path: 'frontend_server'
69-
- uses: actions/setup-node@v2
61+
- name: (Frontend) setup node env
62+
uses: actions/setup-node@v2
7063
with:
7164
node-version: '12'
72-
- name: Install Packages
65+
- name: (Frontend) Install Packages
7366
working-directory: ./frontend_server
7467
run: yarn
75-
- name: Setup config tools
68+
- name: (Frontend) Setup Config CMD Tools
7669
working-directory: ./frontend_server
7770
run: chmod +x ./utils/bin/jq-linux; ./utils/bin/jq-linux -s '.[0] * .[1]' config/config.json config/config.ci.json > /tmp/config.json; cp /tmp/config.json ./config/config.json
78-
- name: Build Project
71+
- name: (Frontend) Build Project
7972
working-directory: ./frontend_server
8073
run: npm run build.ci
81-
- name: Check Bundle Size
74+
- name: (Frontend) Check Bundle Size
8275
working-directory: ./frontend_server
8376
run: BUNDLEWATCH_GITHUB_TOKEN=${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }} npm run size.check
84-
- name: ls frontend_server
85-
working-directory: ./frontend_server
86-
run: ls
87-
- name: ls ..
88-
working-directory: ./frontend_server
89-
run: ls ..; ls ../backend_server
90-
- name: Run Tests
77+
- name: (Frontend) Run e2e Tests
9178
working-directory: ./frontend_server
9279
run: npm run test:ci

0 commit comments

Comments
 (0)