@@ -17,15 +17,15 @@ jobs:
1717
1818 # Virtual Environment to use.
1919 # @see: https://github.com/actions/virtual-environments
20- runs-on : ubuntu-20.04
20+ runs-on : ubuntu-latest
2121
2222 # Environment Variables.
2323 # Accessible by using ${{ env.NAME }}
2424 # Use ${{ secrets.NAME }} to include any GitHub Secrets in ${{ env.NAME }}
2525 # The base folder will always be /home/runner/work/github-repo-name/github-repo-name
2626 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
2929 DB_NAME : test
3030 DB_USER : root
3131 DB_PASS : root
5151
5252 # Steps to install, configure and run tests
5353 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+
5461 - name : Start MySQL
5562 run : sudo systemctl start mysql.service
5663
@@ -65,17 +72,15 @@ jobs:
6572
6673 # Some workflows checkout WordPress from GitHub, but that seems to bring a bunch of uncompiled files with it.
6774 # 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
7984
8085 # We install WP-CLI, as it provides useful commands to setup and install WordPress through the command line.
8186 - name : Install WP-CLI
@@ -97,6 +102,10 @@ jobs:
97102 working-directory : ${{ env.ROOT_DIR }}
98103 run : wp-cli plugin install ${{ env.INSTALL_PLUGINS }}
99104
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+
100109 # Install PHP version to run tests against.
101110 - name : Install PHP
102111 uses : shivammathur/setup-php@v2
0 commit comments