-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (67 loc) · 2.63 KB
/
pushed-to-github.yml
File metadata and controls
79 lines (67 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Automated Tests
# Run Unit Test and POT files when new PR is created
on:
push:
branch:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
- '!main' # excludes master
jobs:
pr_tests:
strategy:
matrix:
php_version: [ '7.3', '7.4', '8.0', '8.1' ]
name: "Basic testing after push-to-repository"
defaults:
run:
shell: bash
env:
# To deploy to the E20R WooCommerce target, set E20R_SSH_SERVER, E20R_SSH_USER, E20R_SSH_PORT, E20R_SSH_KEY and remove traces of the SVN_* variables
# To deploy to the wordpress.org repository, set SVN_USERNAME and SVN_PASSWORD and remove traces of the E20R_SSH_* variables
E20R_PLUGIN_NAME: e20r-members-list
GITHUB_TOKEN: ${{ secrets.GITHUB }}
DOCKER_USER: ${{ secrets.DOCKER_USER }}
CONTAINER_ACCESS_TOKEN: ${{ secrets.CONTAINER_ACCESS_TOKEN }}
runs-on: ubuntu-18.04
steps:
- name: Checkout repository
uses: actions/checkout@v6.0.1
with:
repository: eighty20results/e20r-members-list
- name: Setup PHP with Composer V2+
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
extensions: mbstring, xdebug
tools: composer:v2
coverage: pcov
- name: Login to Docker HUB
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.CONTAINER_ACCESS_TOKEN }}
- name: Load cached Composer and test related dependencies
uses: actions/cache@v4
id: composer-cache
with:
key: ${{ runner.os }}-composer-cache-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-cache
path: inc/**
- name: Install all needed dependencies for Composer
if: steps.restore-cache.outputs.cache-hit != 'true'
run: make composer-dev
- name: Install all needed WordPress plugin dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: make wp-deps
- name: Install all needed dependencies for Docker
if: steps.composer-cache.outputs.cache-hit != 'true'
run: make docker-deps
- name: Run WordPress Code Standard Tests
run: make code-standard-tests
- name: Run PHP Static Code Analysis Tests
run: make phpstan-tests
- name: Run Unit Tests with Code Coverage check
run: make unit-tests
- name: Download artifacts
uses: actions/download-artifact@v6