@@ -17,15 +17,15 @@ jobs:
17
17
18
18
# Virtual Environment to use.
19
19
# @see: https://github.com/actions/virtual-environments
20
- runs-on : ubuntu-20.04
20
+ runs-on : ubuntu-latest
21
21
22
22
# Environment Variables.
23
23
# Accessible by using ${{ env.NAME }}
24
24
# Use ${{ secrets.NAME }} to include any GitHub Secrets in ${{ env.NAME }}
25
25
# The base folder will always be /home/runner/work/github-repo-name/github-repo-name
26
26
env :
27
- ROOT_DIR : /home/runner/work/convertkit-wordpress-libraries/convertkit-wordpress-libraries/wordpress
28
- PLUGIN_DIR : /home/runner/work/convertkit-wordpress-libraries/convertkit-wordpress-libraries/wordpress /wp-content/plugins/convertkit-wordpress-libraries
27
+ ROOT_DIR : /var/www/html
28
+ PLUGIN_DIR : /var/www/html /wp-content/plugins/convertkit-wordpress-libraries
29
29
DB_NAME : test
30
30
DB_USER : root
31
31
DB_PASS : root
51
51
52
52
# Steps to install, configure and run tests
53
53
steps :
54
+ # Checkout Plugin to /home/runner/work/convertkit-wordpress-libraries/convertkit-wordpress-libraries/convertkit-wordpress-libraries
55
+ # We cannot checkout to ${{ env.PLUGIN_DIR }} as GitHub Actions require it be first placed in /home/runner/work/repo/repo
56
+ - name : Checkout Plugin
57
+ uses : actions/checkout@v4
58
+ with :
59
+ path : /home/runner/work/convertkit-wordpress-libraries/convertkit-wordpress-libraries/convertkit-wordpress-libraries
60
+
54
61
- name : Start MySQL
55
62
run : sudo systemctl start mysql.service
56
63
@@ -65,17 +72,15 @@ jobs:
65
72
66
73
# Some workflows checkout WordPress from GitHub, but that seems to bring a bunch of uncompiled files with it.
67
74
# Instead download from wordpress.org stable.
68
- - name : Download WordPress
69
- run : wget https://wordpress.org/wordpress-${{ matrix.wp-versions }}.tar.gz
70
-
71
- - name : Extract WordPress
72
- run : tar xfz wordpress-${{ matrix.wp-versions }}.tar.gz
73
-
74
- # Checkout (copy) this repository's Plugin to this VM.
75
- - name : Checkout Plugin
76
- uses : actions/checkout@v4
77
- with :
78
- path : ${{ env.PLUGIN_DIR }}
75
+ - name : Download and Extract WordPress
76
+ run : |
77
+ sudo chown -R runner:docker /var/www/html
78
+ ls -la /var/www/html
79
+ cd /var/www/html
80
+ wget https://wordpress.org/wordpress-${{ matrix.wp-versions }}.tar.gz
81
+ tar xfz wordpress-${{ matrix.wp-versions }}.tar.gz
82
+ mv wordpress/* .
83
+ rm -rf wordpress wordpress-${{ matrix.wp-versions }}.tar.gz
79
84
80
85
# We install WP-CLI, as it provides useful commands to setup and install WordPress through the command line.
81
86
- name : Install WP-CLI
@@ -97,6 +102,10 @@ jobs:
97
102
working-directory : ${{ env.ROOT_DIR }}
98
103
run : wp-cli plugin install ${{ env.INSTALL_PLUGINS }}
99
104
105
+ # Move Plugin
106
+ - name : Move Plugin
107
+ run : mv /home/runner/work/convertkit-wordpress-libraries/convertkit-wordpress-libraries/convertkit-wordpress-libraries ${{ env.PLUGIN_DIR }}
108
+
100
109
# Install PHP version to run tests against.
101
110
- name : Install PHP
102
111
uses : shivammathur/setup-php@v2
0 commit comments