Skip to content

Commit

Permalink
Use GitHub actions to test code (#58)
Browse files Browse the repository at this point in the history
Summary:
This changeset adds a GitHub action to run unit tests and PHP CodeSniffer against the codebase.

Pull Request resolved: #58

Reviewed By: grepfruit

Differential Revision: D65531696

Pulled By: vahidkay-meta

fbshipit-source-id: 19fead108cc5c560c4ba4ff74b7765a5e68e79da
  • Loading branch information
nikolap994 authored and facebook-github-bot committed Nov 6, 2024
1 parent bce3ac6 commit f26c317
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test

on:
push:
branches:
- main

jobs:
test-and-code-style:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install dependencies
run: composer install --prefer-dist

- name: Run tests
run: vendor/bin/phpunit --bootstrap __tests__/bootstrap.php __tests__

- name: Run PHPCS
run: vendor/bin/phpcs --standard=WordPress --extensions=php --ignore=vendor/ .

0 comments on commit f26c317

Please sign in to comment.