Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
ab02877
Add e2e gh action
brbrr May 19, 2020
76f1288
add node and php env
brbrr May 19, 2020
eb55a48
fix command
brbrr May 19, 2020
17cf2cd
don't use custom image for build
brbrr May 19, 2020
956a9a9
remove pptr image completely
brbrr May 19, 2020
d61fc5b
Add config decryption and setup steps
brbrr May 19, 2020
c1fd665
add some logging for nginx
brbrr May 19, 2020
024a81a
a bit more logging
brbrr May 19, 2020
9723f79
install nginx
brbrr May 19, 2020
f5e8006
fix typo
brbrr May 19, 2020
dc9793f
moar debug
brbrr May 19, 2020
06cedc6
.
brbrr May 19, 2020
ef0d3db
:shrug:
brbrr May 19, 2020
499cffd
meh
brbrr May 19, 2020
8735197
tweak setup wp script a bit
brbrr May 19, 2020
ccfb89f
tweaking setup script
brbrr May 19, 2020
f9471da
.
brbrr May 19, 2020
2a371c2
..
brbrr May 19, 2020
ea4727e
...
brbrr May 19, 2020
ca7ed29
.
brbrr May 19, 2020
fe7b287
.
brbrr May 19, 2020
0fae619
.
brbrr May 19, 2020
48cc914
....
brbrr May 19, 2020
c3af8e7
..
brbrr May 19, 2020
56add46
.
brbrr May 19, 2020
3631f85
..
brbrr May 19, 2020
2a26e99
.
brbrr May 19, 2020
628e55f
try run tests :fingercrossed:
brbrr May 19, 2020
3760005
try without services and actions
brbrr May 20, 2020
fe82471
update WP path in tests
brbrr May 20, 2020
3fbdc6d
fix script
brbrr May 20, 2020
55a5d91
clean up a bit
brbrr May 20, 2020
3d37c23
:shrug:
brbrr May 20, 2020
e1dad67
minor tweaks
brbrr May 20, 2020
eea5f3c
fix connection
brbrr May 20, 2020
fbbd732
Try add an action
brbrr May 20, 2020
85d87f9
Test new action in cloud
brbrr May 20, 2020
68bc129
fix permissions
brbrr May 20, 2020
9d436ee
..
brbrr May 20, 2020
b105601
try service
brbrr May 20, 2020
2ade9ae
:shrug:
brbrr May 20, 2020
d1dd1b0
try this
brbrr May 20, 2020
e459ff0
try this maybe
brbrr May 20, 2020
3f6e0e8
try access service container
brbrr May 20, 2020
e455f0f
.
brbrr May 20, 2020
44bdeb9
try correct docker syntax :)
brbrr May 20, 2020
7a0f977
try this
brbrr May 20, 2020
5a0c62d
echo service
brbrr May 20, 2020
a87b9ac
maybe this?
brbrr May 20, 2020
607c4f9
doitright!
brbrr May 20, 2020
de73605
maybe this will work?
brbrr May 20, 2020
7ac2b5d
yo
brbrr May 20, 2020
1a463b2
.
brbrr May 20, 2020
ce0702f
.
brbrr May 20, 2020
7697952
[not verified] .
brbrr May 20, 2020
5c0f45c
log docker containers
brbrr May 20, 2020
eb8f354
add tmate debug
brbrr May 20, 2020
e7c6e1c
comment out things that's not needed atm
brbrr May 20, 2020
93ef131
forward mysql ports
brbrr May 20, 2020
35b5db4
.
brbrr May 20, 2020
a23318b
update ports
brbrr May 20, 2020
79d87d8
specify wordpress version
brbrr May 20, 2020
78090b3
.
brbrr May 20, 2020
cf151c1
fix syntax issue
brbrr May 20, 2020
1d28807
try this
brbrr May 20, 2020
b0b9453
?
brbrr May 20, 2020
3b5a0c2
??
brbrr May 20, 2020
446ec98
???
brbrr May 20, 2020
a67edf9
try this!
brbrr May 20, 2020
c82eb40
?
brbrr May 20, 2020
84ff29a
whatever
brbrr May 20, 2020
f5b40c4
try mysql service
brbrr May 20, 2020
bb638db
.
brbrr May 20, 2020
18b0709
comment out wp job
brbrr May 20, 2020
4320c77
remove local action
brbrr May 21, 2020
74a16f0
.
brbrr May 21, 2020
095cbb3
.
brbrr May 21, 2020
a163394
add conditional check for travis
brbrr May 21, 2020
f22b39b
cleanup
brbrr May 21, 2020
7af69bd
make it actually work :)
brbrr May 21, 2020
8422849
try fix travis build
brbrr May 21, 2020
9776de2
maybe this will work?
brbrr May 21, 2020
9e87482
try with container!
brbrr May 21, 2020
2b01d2d
fix port syntax
brbrr May 21, 2020
4879a30
yo
brbrr May 21, 2020
69805d9
.
brbrr May 21, 2020
1500c94
.
brbrr May 21, 2020
3b7a4f7
..
brbrr May 21, 2020
ff79799
try this!
brbrr May 21, 2020
f1f85c3
remove chekc
brbrr May 21, 2020
f413149
..
brbrr May 21, 2020
0249b78
.
brbrr May 21, 2020
6ad7a14
try running in containers
brbrr May 21, 2020
b11adac
remove containerized job and add caching
brbrr May 21, 2020
0774c62
cleanup
brbrr May 21, 2020
b81bcc1
fix linting issue
brbrr May 21, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
comment out wp job
  • Loading branch information
brbrr committed May 20, 2020
commit 18b070999247623266129fb91541014c8838f610
158 changes: 78 additions & 80 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,98 +8,96 @@ env:
DB_PASSWORD: root

jobs:
wp:
runs-on: ubuntu-latest
# Service containers to run with `container-job`
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: jetpack_test
ports:
- 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
wp:
image: wordpress
ports:
- 8080:80
# env:
# # WORDPRESS_DB_HOST: 127.0.0.1
# WORDPRESS_DB_USER: root
# WORDPRESS_DB_PASSWORD: root
# WORDPRESS_DB_NAME: jetpack_test
# # WORDPRESS_TABLE_PREFIX: wp_
options: --name wpcnt
wp-cli:
image: wordpress:cli
options: --name wpcli
# wp:
# runs-on: ubuntu-latest
# # Service containers to run with `container-job`
# services:
# mysql:
# image: mysql:5.7
# env:
# MYSQL_ALLOW_EMPTY_PASSWORD: false
# MYSQL_ROOT_PASSWORD: root
# MYSQL_DATABASE: jetpack_test
# ports:
# - 3306/tcp
# options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
# wp:
# image: wordpress
# ports:
# - 8080:80
# # env:
# # # WORDPRESS_DB_HOST: 127.0.0.1
# # WORDPRESS_DB_USER: root
# # WORDPRESS_DB_PASSWORD: root
# # WORDPRESS_DB_NAME: jetpack_test
# # # WORDPRESS_TABLE_PREFIX: wp_
# options: --name wpcnt
# wp-cli:
# image: wordpress:cli
# options: --name wpcli

steps:
- uses: actions/checkout@v2
# steps:
# - uses: actions/checkout@v2

- run: curl localhost:8080 -v
- run: docker ps -a
- run: sudo systemctl start mysql.service
- run: echo ${{ job.services.mysql.ports['3306'] }}
# - run: curl localhost:8080 -v
# - run: docker ps -a
# - run: sudo systemctl start mysql.service
# - run: echo ${{ job.services.mysql.ports['3306'] }}


- name: Setup tmate session
uses: mxschmitt/action-tmate@v2
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v2

- name: what
env:
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
run: |
WP_ID=$(docker ps -aqf "name=wpcnt")
WP_CLI_ID=$(docker ps -aqf "name=wpcli")
echo $WP_ID
echo $WP_CLI_ID
docker exec wpcnt ls
CLI_CMD="docker run -it --rm --volumes-from wpcnt --network container:wpcnt wordpress:cli"
# - name: what
# env:
# DB_PORT: ${{ job.services.mysql.ports['3306'] }}
# run: |
# WP_ID=$(docker ps -aqf "name=wpcnt")
# WP_CLI_ID=$(docker ps -aqf "name=wpcli")
# echo $WP_ID
# echo $WP_CLI_ID
# docker exec wpcnt ls
# CLI_CMD="docker run -it --rm --volumes-from wpcnt --network container:wpcnt wordpress:cli"

$CLI_CMD core install --title="QQQQQ" --admin_user=wordpress --admin_password=wordpress --admin_email=test@example.com --skip-email --url=http://localhost
# $CLI_CMD core install --title="QQQQQ" --admin_user=wordpress --admin_password=wordpress --admin_email=test@example.com --skip-email --url=http://localhost

$CLI_CMD core config --dbname=$DB_NAME --dbuser=$DB_USERNAME --dbpass=$DB_PASSWORD --dbhost=$DB_HOST --dbprefix=wp_
# $CLI_CMD core config --dbname=$DB_NAME --dbuser=$DB_USERNAME --dbpass=$DB_PASSWORD --dbhost=$DB_HOST:32768 --dbprefix=wp_


- run: curl -s https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip > ngrok.zip
# - run: sudo apt update && sudo apt install unzip -y
- run: unzip -o ngrok.zip
- run: ./ngrok http -log=stdout 80 > /dev/null &
- run: echo $(curl -s localhost:4040/api/tunnels/command_line | jq --raw-output .public_url)
# - run: curl -s https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip > ngrok.zip
# # - run: sudo apt update && sudo apt install unzip -y
# - run: unzip -o ngrok.zip
# - run: ./ngrok http -log=stdout 80 > /dev/null &
# - run: echo $(curl -s localhost:4040/api/tunnels/command_line | jq --raw-output .public_url)
# - run: sleep 6000

# e2e_tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# # - run: sudo apt update
# # - run: sudo apt install -y php-fpm nginx
# # - run: sudo systemctl start mysql.service

# - name: DO local action
# uses: ./.github/actions/wp # Uses an action in the root directory
# id: hello
# with:
# who-to-greet: 'Mona the Octocat'

e2e_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# - run: sudo apt update
# - run: sudo apt install -y php-fpm nginx
# - run: sudo systemctl start mysql.service

# - name: DO local action
# uses: ./.github/actions/wp # Uses an action in the root directory
# id: hello
# with:
# who-to-greet: 'Mona the Octocat'

# - name: Setup env and WordPress
# run: |
# sudo apt update
# sudo apt install -y php-fpm nginx
# sudo systemctl start mysql.service
# ./tests/e2e/bin/setup-e2e-travis.sh
- name: Setup env and WordPress
run: |
sudo apt update
sudo apt install -y php-fpm nginx
sudo systemctl start mysql.service
./tests/e2e/bin/setup-e2e-travis.sh

# - name: Build Jetpack
# run: yarn && yarn build-production
- name: Build Jetpack
run: yarn && yarn build-production

# - name: Decrypt config
# env:
# CONFIG_KEY: ${{ secrets.E2E_CONFIG_KEY }}
# run: yarn test-decrypt-config
# - name: Run tests
# run: yarn test-e2e --runInBand --verbose
- name: Decrypt config
env:
CONFIG_KEY: ${{ secrets.E2E_CONFIG_KEY }}
run: yarn test-decrypt-config
- name: Run tests
run: yarn test-e2e --runInBand --verbose