feat(core): Add maximum coupon usage #1837
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish & Install | |
on: | |
push: | |
branches: | |
- master | |
- major | |
- minor | |
- parallel-e2e | |
pull_request: | |
branches: | |
- master | |
- major | |
- minor | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
publish_install: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
# Temporarily disabled Node v18 because of this issue: | |
# https://github.com/vendure-ecommerce/vendure/actions/runs/5200017548/jobs/9378196658#step:4:48 | |
# which is related to our Verdaccio setup. Will need some investigation. | |
#node-version: [16.x, 18.x] | |
node-version: [16.x] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install Verdaccio | |
run: | | |
npm install -g verdaccio | |
npm install -g verdaccio-auth-memory | |
npm install -g verdaccio-memory | |
npm install -g [email protected] | |
tmp_registry_log=`mktemp` | |
mkdir -p $HOME/.config/verdaccio | |
cp -v ./.github/workflows/verdaccio/config.yaml $HOME/.config/verdaccio/config.yaml | |
nohup verdaccio --config $HOME/.config/verdaccio/config.yaml &>$tmp_registry_log & | |
npm-auth-to-token -u test -p test -e [email protected] -r http://0.0.0.0:4873 | |
- name: Windows dependencies | |
if: matrix.os == 'windows-latest' | |
run: npm install -g @angular/cli | |
# - name: Get yarn cache directory path | |
# id: yarn-cache-dir-path | |
# run: echo "::set-output name=dir::$(yarn cache dir)" | |
# - uses: actions/cache@v3 | |
# id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
# with: | |
# path: '**/node_modules' | |
# key: ${{ runner.os }}-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
# restore-keys: | | |
# ${{ runner.os }}-${{ matrix.node-version }}-yarn- | |
- name: Yarn install | |
# if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: | | |
yarn config set unsafe-perm true | |
yarn install --network-timeout 1000000 --prefer-offline | |
env: | |
CI: true | |
- name: Bootstrap | |
run: yarn bootstrap | |
env: | |
CI: true | |
- name: Publish to Verdaccio | |
run: | | |
yarn lerna publish prepatch --preid ci --no-push --no-git-tag-version --no-commit-hooks --force-publish "*" --yes --dist-tag ci --registry http://0.0.0.0:4873 | |
- name: Install via @vendure/create | |
run: | | |
mkdir -p $HOME/install | |
cd $HOME/install | |
npm set registry=http://0.0.0.0:4873 | |
npm dist-tag ls @vendure/create | |
npx @vendure/create@ci test-app --ci --use-npm --log-level info | |
- name: Server smoke tests | |
run: | | |
cd $HOME/install/test-app | |
npm run dev & | |
node $GITHUB_WORKSPACE/.github/workflows/scripts/smoke-tests |