Skip to content

Commit 6e2b783

Browse files
committed
Adda build status test for pushes to trunk
1 parent e09580f commit 6e2b783

File tree

2 files changed

+73
-1
lines changed

2 files changed

+73
-1
lines changed

.github/workflows/build-status.yml

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Build Status
2+
3+
on:
4+
push:
5+
branches:
6+
- trunk
7+
8+
jobs:
9+
10+
# Creates a complete build of the plugin.
11+
#
12+
# Performs the following steps:
13+
# - Checks out the repository.
14+
# - Sets up PHP.
15+
# - Logs debug information about the runner container.
16+
# - Installs Composer dependencies (use cache if possible).
17+
# - Make Composer packages available globally.
18+
# - Installs Node dependencies
19+
# - Run the plugin build scripts
20+
Build plugin:
21+
name: Check PHP compatibility
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v2
27+
28+
- name: Set up PHP
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
php-version: '7.4'
32+
coverage: none
33+
tools: composer, cs2pr
34+
35+
- name: Install NodeJS
36+
uses: actions/setup-node@v1
37+
with:
38+
node-version: 12
39+
40+
- name: Cache NodeJS modules
41+
uses: actions/cache@v2
42+
env:
43+
cache-name: cache-node-modules
44+
with:
45+
# npm cache files are stored in `~/.npm` on Linux/macOS
46+
path: ~/.npm
47+
key: ${{ runner.os }}-npm-${{ hashFiles('**/yarn.lock') }}
48+
restore-keys: |
49+
${{ runner.os }}-npm-
50+
51+
- name: Log debug information
52+
run: |
53+
php --version
54+
node --version
55+
composer --version
56+
yarn --version
57+
58+
- name: Install Composer dependencies
59+
uses: ramsey/composer-install@v1
60+
with:
61+
composer-options: "--no-progress --no-ansi --no-interaction"
62+
63+
- name: Make Composer packages available globally
64+
run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
65+
66+
- name: Install Node dependencies
67+
run: yarn install
68+
69+
- name: Build plugin
70+
run: yarn run build
71+
72+

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Health Check
22

3-
[![Build Status](https://travis-ci.com/WordPress/health-check.svg?branch=master)](https://travis-ci.com/WordPress/health-check)
3+
![Build Status](https://github.com/WordPress/health-check/workflows/Build%20Status/badge.svg)
44

55
Health Check is a WordPress plugin that will perform a number of checks on your WordPress install to detect common configuration errors and known issues.
66

0 commit comments

Comments
 (0)