Skip to content

Commit

Permalink
Migrate to GH Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmlee101 committed Jun 13, 2024
1 parent a70d419 commit 6c8d745
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 21 deletions.
21 changes: 21 additions & 0 deletions .github/actions/composite/setup-composer-cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Set up Composer Cache
description: Set up Composer Cache

runs:
using: composite
steps:
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
shell: bash

- name: Cache Composer Files
uses: actions/[email protected]
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Composer install
run: composer install --prefer-dist --no-interaction --dev
shell: bash
66 changes: 66 additions & 0 deletions .github/workflows/bedrock-php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Test Suite
on:
push:
branches:
- "**/*"
- "!main"
concurrency:
group: "${{ github.ref }}"
cancel-in-progress: true
env:
TRAVIS_COMMIT: ${{ github.sha }}
TRAVIS_BRANCH: ${{ github.ref }}
jobs:
PHP_Phan:
name: Phan
runs-on: ubuntu-20.04
timeout-minutes: 15
steps:
- name: checkout
uses: actions/[email protected]
with:
# Set fetch-depth to 100 so that we can compare HEAD with a good chunk of git log history
fetch-depth: 100

# Run this after the packages are installed to ensure our apt-mirror is set up.
- name: Install PHP and Libraries
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2.28.0
with:
tools: composer:v2.7.1
php-version: 8.1.28
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.CODE_EXPENSIFY_TOKEN }}
fail-fast: true

- name: Setup Composer Cache
uses: ./.github/actions/composite/setup-composer-cache

- name: Run Phan tests
run: "php ./ci/phan.php"
PHP_Style:
name: PHP Style
runs-on: ubuntu-20.04
timeout-minutes: 15
steps:
- name: checkout
uses: actions/[email protected]
with:
# Set fetch-depth to 100 so that we can compare HEAD with a good chunk of git log history
fetch-depth: 100

- name: Install PHP and Libraries
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2.28.0
with:
tools: composer:v2.7.1
php-version: 8.1.28
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.CODE_EXPENSIFY_TOKEN }}
fail-fast: true

- name: Setup Composer Cache
uses: ./.github/actions/composite/setup-composer-cache

- name: Test for Style
run: "php ./ci/style.php"
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

0 comments on commit 6c8d745

Please sign in to comment.