diff --git a/.circleci/config.yml b/.circleci/config.yml index b6c9a3f8ad..5b8c35ae22 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -169,6 +169,10 @@ jobs: name: Group acceptance tests to run in parallel command: | ./do test:acceptance-group-tests + - run: + name: Download additional WP Plugins for tests + command: | + ./do download:woo-commerce-subscriptions-zip 3.0.14 - run: name: Dump tests ENV variables for acceptance tests command: | @@ -296,6 +300,9 @@ jobs: wordpress_image_version: type: string default: '' + woo_subscriptions_version: + type: string + default: '' environment: MYSQL_COMMAND: << parameters.mysql_command >> MYSQL_IMAGE_VERSION: << parameters.mysql_image_version >> @@ -306,6 +313,12 @@ jobs: - run: name: "Set up virtual host" command: echo 127.0.0.1 mailpoet.loc | sudo tee -a /etc/hosts + - when: + condition: << parameters.woo_subscriptions_version >> + steps: + - run: + name: Download additional WP Plugins + command: ./do download:woo-commerce-subscriptions-zip << parameters.woo_subscriptions_version >> - run: name: Run acceptance tests command: | @@ -590,11 +603,13 @@ workflows: - acceptance_tests: <<: *slack-fail-post-step name: acceptance_latest + woo_subscriptions_version: latest requires: - build - acceptance_tests: <<: *slack-fail-post-step name: acceptance_oldest + woo_subscriptions_version: 3.0.14 mysql_command: --max_allowed_packet=100M mysql_image_version: 5.5-ram wordpress_image_version: wp-5.3_php7.1_20210129.1 diff --git a/tasks/GithubClient.php b/tasks/GithubClient.php index d948573a73..4a79edb139 100644 --- a/tasks/GithubClient.php +++ b/tasks/GithubClient.php @@ -38,7 +38,7 @@ class GithubClient { } private function getRelease($tag = null) { - $path = 'releases/' . ($tag ? "tags/$tag" : 'latest'); + $path = 'releases/' . ($tag && $tag !== 'latest' ? "tags/$tag" : 'latest'); $response = $this->httpClient->get($path); return json_decode($response->getBody()->getContents(), true); }