-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from pressbooks/revivify
Update this repo
- Loading branch information
Showing
18 changed files
with
16,165 additions
and
11,222 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for npm | ||
- package-ecosystem: "npm" | ||
# Look for `package.json` and `package-lock.json` files in the root directory | ||
directory: "/" | ||
# Check for updates daily | ||
schedule: | ||
interval: "daily" | ||
allow: | ||
# Allow direct updates only (for packages named in package.json) | ||
- dependency-type: "direct" | ||
# Allow up to 10 open pull requests for npm dependencies | ||
open-pull-requests-limit: 10 | ||
|
||
# Maintain dependencies for Composer | ||
- package-ecosystem: "composer" | ||
# Look for `composer.json` and `composer.lock` files in the root directory | ||
directory: "/" | ||
# Check for updates daily | ||
schedule: | ||
interval: "daily" | ||
allow: | ||
# Allow direct updates only (for packages named in composer.json) | ||
- dependency-type: "direct" | ||
# Allow up to 10 open pull requests for composer dependencies | ||
open-pull-requests-limit: 10 |
Empty file.
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build & Lint | ||
on: | ||
push: | ||
branches: [ dev, master ] | ||
tags: | ||
- '*.*.*' | ||
pull_request: | ||
branches: [ dev ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [ '14' ] | ||
name: Node ${{ matrix.node }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- name: Cache Node modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} | ||
- name: Install Node dependencies & build assets | ||
run: | | ||
node -v | ||
npm install | ||
npm run build | ||
- name: Run ESLint and Stylelint | ||
run: npm run lint |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Run Standards & Tests | ||
on: | ||
push: | ||
branches: [ dev ] | ||
tags: | ||
- '*.*.*' | ||
pull_request: | ||
branches: [ dev ] | ||
jobs: | ||
tests: | ||
runs-on: ${{ matrix.os }} | ||
continue-on-error: ${{ matrix.experimental }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [ 7.4 ] | ||
os: [ ubuntu-20.04 ] | ||
wordpress: [ 5.9.3, latest ] | ||
experimental: [ false ] | ||
include: | ||
- php: 8.0 | ||
os: ubuntu-20.04 | ||
wordpress: latest | ||
experimental: true | ||
name: Test - PHP ${{ matrix.php }} - WP ${{ matrix.wordpress }} | ||
|
||
env: | ||
WP_VERSION: ${{ matrix.wordpress }} | ||
WP_MULTISITE: 1 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Start required services | ||
run: sudo systemctl start mysql.service | ||
|
||
- name: Cache Composer packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor | ||
key: ${{ matrix.php }}-php-${{ hashFiles('**/composer.lock') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: phpcs, composer | ||
coverage: pcov | ||
|
||
- name: Install PHP dependencies | ||
run: | | ||
export PATH="$HOME/.composer/vendor/bin:$PATH" | ||
composer install --no-interaction | ||
git clone --depth=1 https://github.com/pressbooks/pressbooks.git ../pressbooks | ||
cd ../pressbooks && composer install --no-dev | ||
cd ../pressbooks-plugin-scaffold | ||
- name: Run PHP CodeSniffer | ||
run: composer standards | ||
|
||
- name: Install WP tests | ||
run: bash bin/install-wp-tests.sh wordpress_test root root localhost ${{ matrix.wordpress }} | ||
|
||
- name: Run PHP Tests | ||
run: vendor/bin/phpunit | ||
if: matrix.experimental == true | ||
|
||
- name: Run PHP Tests and PCOV | ||
run: composer test-coverage | ||
if: matrix.experimental == false | ||
|
||
- name: Upload Coverage to Codecov | ||
run: bash <(curl -s https://codecov.io/bash) | ||
if: matrix.experimental == false |
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.