[CMSP-726] switch to gha #36
Workflow file for this run
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: | |
pull_request: | |
release: | |
types: [created] | |
permissions: write-all | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
container: | |
image: quay.io/pantheon-public/docker-updatinator:3.x | |
options: user --root | |
# services: | |
# mariadb: | |
# image: mariadb:10.5 | |
# env: | |
# MYSQL_DATABASE: updatinate-wp-db | |
# MYSQL_ROOT_PASSWORD: '' | |
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: Run tests | |
env: | |
GITHUB_TOKEN: ${{ secrets.PANTHEON_UPSTREAM_AUTH_TOKEN }} | |
GH_TOKEN: ${{ secrets.PANTHEON_UPSTREAM_AUTH_TOKEN }} | |
run: composer test |