Bump axios from 0.21.1 to 1.6.0 #40
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: Build and deploy Pull Request Review App | |
env: | |
PR_SOURCE: ${{ github.head_ref }} | |
PR_REPOSITORY: ${{ github.repository }} | |
PR_REVIEWAPP_MESSAGE: 'Build was successful and a review app can be found here: https://${{ github.head_ref }}.london.cloudapps.digital' | |
on: | |
pull_request: | |
branches: master | |
types: [opened, synchronize, reopened, edited] | |
jobs: | |
laravel-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Copy .env | |
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | |
- name: Install Dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Generate key | |
run: php artisan key:generate | |
- name: Directory Permissions | |
run: chmod -R 777 storage bootstrap/cache | |
- name: Create Database | |
run: | | |
mkdir -p database | |
touch database/database.sqlite | |
- name: Execute tests (Unit and Feature tests) via PHPUnit | |
env: | |
DB_CONNECTION: sqlite | |
DB_DATABASE: database/database.sqlite | |
run: vendor/bin/phpunit | |
# Deploy review app | |
- name: Deploy for review | |
uses: citizen-of-planet-earth/cf-cli-action@master | |
with: | |
cf_api: https://api.london.cloud.service.gov.uk | |
cf_username: ${{ secrets.SANDBOX_CF_USERNAME }} | |
cf_password: ${{ secrets.SANDBOX_CF_PASSWORD }} | |
cf_org: dof-dss | |
cf_space: Sandbox | |
command: push architecture-catalogue--$PR_SOURCE | |
- name: Set Environment variables | |
uses: citizen-of-planet-earth/cf-cli-action@master | |
with: | |
cf_api: https://api.london.cloud.service.gov.uk | |
cf_username: ${{ secrets.SANDBOX_CF_USERNAME }} | |
cf_password: ${{ secrets.SANDBOX_CF_PASSWORD }} | |
cf_org: dof-dss | |
cf_space: Sandbox | |
command: set-env architecture-catalogue--$PR_SOURCE ASPNETCORE_ENVIRONMENT Review | |
- name: Set Review status | |
uses: citizen-of-planet-earth/cf-cli-action@master | |
with: | |
cf_api: https://api.london.cloud.service.gov.uk | |
cf_username: ${{ secrets.SANDBOX_CF_USERNAME }} | |
cf_password: ${{ secrets.SANDBOX_CF_PASSWORD }} | |
cf_org: dof-dss | |
cf_space: Sandbox | |
command: set-env architecture-catalogue--$PR_SOURCE PR_REVIEW True | |
- name: Set Review name | |
uses: citizen-of-planet-earth/cf-cli-action@master | |
with: | |
cf_api: https://api.london.cloud.service.gov.uk | |
cf_username: ${{ secrets.SANDBOX_CF_USERNAME }} | |
cf_password: ${{ secrets.SANDBOX_CF_PASSWORD }} | |
cf_org: dof-dss | |
cf_space: Sandbox | |
command: set-env architecture-catalogue--$PR_SOURCE PR_NAME $PR_SOURCE | |
- name: Restage app | |
uses: citizen-of-planet-earth/cf-cli-action@master | |
with: | |
cf_api: https://api.london.cloud.service.gov.uk | |
cf_username: ${{ secrets.SANDBOX_CF_USERNAME }} | |
cf_password: ${{ secrets.SANDBOX_CF_PASSWORD }} | |
cf_org: dof-dss | |
cf_space: Sandbox | |
command: restage architecture-catalogue--$PR_SOURCE | |
- name: Comment PR | |
uses: thollander/actions-comment-pull-request@master | |
with: | |
message: 'Build was successful and a review app can be found here: https://architecture-catalogue--${{ github.head_ref }}.london.cloudapps.digital' | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |