-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (52 loc) · 1.51 KB
/
test_and_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
name: Test and Build
on: [push]
jobs:
test:
runs-on: "ubuntu-20.04"
env:
RACK_ENV: test
PG_HOST: localhost
PG_USER: backends_u
PG_PASSWORD: abc
steps:
- uses: actions/checkout@v2
- uses: quickpay/postgresql-action@v2
- uses: actions/setup-node@v2
with:
node-version: "12"
cache: "npm"
- run: npm install && npm run build
- uses: ./dist/
with:
ssh_key: "${{secrets.SSH_KEY_GITHUB}}"
prod_apt_deps: true
chrome: true
rubocop: true
postgres: true
gem_server_credentials: "${{secrets.BUNDLE_GEMS__QUICKPAY__NET}}"
gem_github_credentials: ${{secrets.BUNDLE_RUBYGEMS__PKG__GITHUB__COM}}
set_env_var: true
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- run: git clone git@github.com:QuickPay/klarna-payments-backend.git
- run: gem install bundler
- name: Tests
run: cd integration_test && bundle install && bundle exec rake test
- run: cd klarna-payments-backend && bundle install
build:
needs: test
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "12"
cache: "npm"
- run: npm install && npm run build
- uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: build
FOLDER: dist
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}