Skip to content

[CMSP-726] switch to gha #38

[CMSP-726] switch to gha

[CMSP-726] switch to gha #38

Workflow file for this run

name: Test
on:
pull_request:
release:
types: [created]
permissions: write-all
jobs:
test:
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:10.5
env:
MYSQL_DATABASE: updatinate-wp-db
MYSQL_ROOT_PASSWORD: root
steps:
- uses: actions/checkout@v2
- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
- name: Start MySQL
run: sudo systemctl start mysql
- name: Install Composer Dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Install SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.PANTHEON_UPSTREAM_SSH_KEY }}
- name: Unset GitHub Tokens
shell: bash
run: |
unset GITHUB_TOKEN
unset GH_TOKEN
- name: Run Update Tool Whoami
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.PANTHEON_UPSTREAM_AUTH_TOKEN }}
GH_TOKEN: ${{ secrets.PANTHEON_UPSTREAM_AUTH_TOKEN }}
run: |
echo "Set git config"
git config --global user.email "[email protected]"
git config --global user.name "Pantheon Automation"
echo "Login with gh auth"
# gh auth login
gh auth status
./update-tool whoami
- name: Install WP-CLI
run: |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
wp --info
- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.PANTHEON_UPSTREAM_AUTH_TOKEN }}
GH_TOKEN: ${{ secrets.PANTHEON_UPSTREAM_AUTH_TOKEN }}
DB_USER: root
DB_PASSWORD: root
DB_NAME: updatinate-wp-db
run: composer test