Skip to content

26.4.0

26.4.0 #54

Workflow file for this run

name: PHP Composer
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update Composer.json
run: composer update
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Retrieve bearer token for EInvoicing
id: get_bearer_token_einvoicing
run: |
response=$(curl -X POST ${{secrets.OKTA_ACCESS_TOKEN_URL}}/connect/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=${{secrets.OKTA_CLIENT_ID}}&client_secret=${{secrets.OKTA_CLIENT_SECRET}}")
token=$(echo $response | jq -r '.access_token')
echo "BEARER_TOKEN_EINVOICING=${token}" >> $GITHUB_ENV
- name: Retrieve bearer token for A1099
id: get_bearer_token_a1099
run: |
response=$(curl -X POST ${{secrets.AI_SBX_URL}}/connect/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=${{secrets.AI_CLIENT_ID_A1099}}&client_secret=${{secrets.AI_CLIENT_SECRET_A1099}}")
token=$(echo $response | jq -r '.access_token')
echo "BEARER_TOKEN_A1099=${token}" >> $GITHUB_ENV
- name: Create .env file
run: |
echo "BEARER_TOKEN_EINVOICING=${{ env.BEARER_TOKEN_EINVOICING }}" > .env
echo "BEARER_TOKEN_A1099=${{ env.BEARER_TOKEN_A1099 }}" >> .env
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run test suite
run: composer run-script test
env:
BEARER_TOKEN_EINVOICING: ${{ env.BEARER_TOKEN_EINVOICING }}
BEARER_TOKEN_A1099: ${{ env.BEARER_TOKEN_A1099 }}