-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (52 loc) · 1.85 KB
/
integrate.yml
File metadata and controls
67 lines (52 loc) · 1.85 KB
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
name: Integrate
on:
pull_request:
branches: [master]
push:
branches: [master]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
- uses: nelonoel/branch-name@v1.0.1
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install yarn
run: |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install yarn
- name: Install firefox
run: sudo apt install firefox
- name: Install geckodriver
run: |
wget https://github.com/mozilla/geckodriver/releases/download/v0.28.0/geckodriver-v0.28.0-linux64.tar.gz
tar -xvzf geckodriver*
sudo mv geckodriver /usr/local/bin
geckodriver --version
- name: Install dependencies
run: make install
- name: Build bundle
run: make build
- name: Unit tests
run: make test-unit
- name: Functional tests
run: make test-ft
- name: Create ssh key file from secrets
run: mkdir -p ~/.ssh && echo "${{ secrets.SSH_KEY_DO }}" >> ~/.ssh/id_rsa_do && chmod 0600 ~/.ssh/id_rsa_do
- name: Get source branch name on pull request
run: echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
if: ${{ github.event_name == 'pull_request' }}
- name: Deploy to staging server
run: make deploy-staging ARGS="version=${BRANCH_NAME}"
- name: Test against staging server
run: make test-ft-staging
env:
STAGING_DOMAIN: ${{ secrets.STAGING_DOMAIN }}
- name: Deploy to production server
run: make deploy-prod
if: ${{ env.BRANCH_NAME == 'master' }}