-
Notifications
You must be signed in to change notification settings - Fork 30
68 lines (60 loc) · 1.76 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
name: Test
on: [push, pull_request]
jobs:
variables:
runs-on: ubuntu-latest
outputs:
branch: ${{ steps.variables.outputs.branch }}
repository_url: ${{ steps.variables.outputs.repository_url }}
steps:
- uses: actions/checkout@v4
- name: Generate variables
id: variables
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: .github/scripts/variables.sh
build:
runs-on: ubuntu-latest
needs: variables
steps:
- uses: actions/checkout@v4
- name: docker login
run: docker login https://docker.pkg.github.com -u SwedbankPay --password ${{ secrets.GITHUB_TOKEN }}
- name: build
run: |
docker compose run \
-e GITHUB_BRANCH="${{ needs.variables.outputs.branch }}" \
-e GITHUB_REPOSITORY_URL="${{ needs.variables.outputs.repository_url }}" \
portal build \
--env=production \
--site-url=https://developer.swedbankpay.com
- name: Upload site
uses: actions/upload-artifact@v4
with:
name: build-site
path: _site
spec:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: build-site
path: _site
- name: Set up Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
rubygems: 3.3.22
bundler-cache: true
- name: Cache HTMLProofer
id: cache-htmlproofer
uses: actions/cache@v4
with:
path: tmp/.htmlproofer
key: ${{ runner.os }}-htmlproofer
- name: rspec
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bundle exec rake