diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9a6ac16..c746130 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,35 +2,45 @@ name: PHP Composer on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - 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@v2 - with: - path: vendor - key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-php- - - - name: Install dependencies - run: composer install --prefer-dist --no-progress - - - name: Run test suite - run: USERNAME="${{ secrets.API_USERNAME }}" PASSWORD="${{ secrets.API_PASSWORD }}" composer run-script test + - uses: actions/checkout@v2 + + - 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@v2 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Retrieve bearer token + id: get_bearer_token + 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=${token}" >> $GITHUB_ENV + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + - name: Run test suite + run: composer run-script test + env: + BEARER_TOKEN: ${{ env.BEARER_TOKEN }} diff --git a/.whitesource b/.whitesource deleted file mode 100644 index 760f2fa..0000000 --- a/.whitesource +++ /dev/null @@ -1,14 +0,0 @@ -{ - "scanSettings": { - "configMode": "AUTO", - "configExternalURL": "", - "projectToken": "" - }, - "commitStatusSettings": { - "vulnerableCommitStatus": "FAILED" - }, - "issueSettings": { - "minSeverityLevel": "LOW", - "openConfidentialIssues": true - } -}