Run on trunk code

This commit is contained in:
Greg 2021-12-08 17:23:00 -07:00
parent 24f2f55742
commit 44eedb0ee9
1 changed files with 20 additions and 13 deletions

View File

@ -20,7 +20,6 @@ jobs:
repo: WC_SUBSCRIPTIONS_REPO
private: true
steps:
- name: Create dirs.
run: |
mkdir -p code/woocommerce
@ -41,21 +40,29 @@ jobs:
- name: Load docker images and start containers.
working-directory: package/woocommerce/plugins/woocommerce
run: pnpm nx docker-up woocommerce
run: pnpx wc-e2e docker:up
- name: Move current directory to code. We will install zip file in this dir later.
run: mv ./package/woocommerce/plugins/woocommerce/* ./code/woocommerce
- name: Download WooCommerce release zip
- name: Download WooCommerce ZIP.
uses: actions/download-artifact@v2
with:
name: woocommerce
path: tmp
- name: Extract and replace WooCommerce zip.
working-directory: tmp
run: |
ASSET_ID=$(jq ".release.assets[0].id" $GITHUB_EVENT_PATH)
curl https://api.github.com/repos/woocommerce/woocommerce/releases/assets/${ASSET_ID} -LJOH 'Accept: application/octet-stream'
unzip woocommerce.zip -d woocommerce
mv woocommerce/woocommerce/* ../package/woocommerce/plugins/woocommerce/
- name: Install dependencies again
working-directory: package/woocommerce
run: |
npm install -g pnpm
pnpm install
- name: Run tests command.
working-directory: package/woocommerce/plugins/woocommerce
env: