Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to GH Actions #213

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.