Merge pull request #2268 from SwedbankPay/feature/devp-375_onephase_a… #14673
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |