This repository has been archived by the owner on Jun 17, 2024. It is now read-only.
fix: update getAvailablePaymentMethods parameters #61
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: CI | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
- release/* | |
pull_request: | |
types: ['opened', 'edited', 'reopened', 'synchronize'] | |
branches: | |
- main | |
- develop | |
- release/* | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
prepare_dependencies: | |
name: Prepare dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
# Disabling shallow clone is recommended for improving relevancy of reporting (sonar cloud) | |
fetch-depth: 0 | |
- uses: ./.github/actions/install-dependencies | |
with: | |
NPM_EMAIL: ${{ secrets.NPM_EMAIL }} | |
NPM_USER: ${{ secrets.NPM_USER }} | |
NPM_PASS: ${{ secrets.NPM_PASS }} | |
build: | |
name: Build | |
needs: prepare_dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- uses: ./.github/actions/install-dependencies | |
with: | |
NPM_EMAIL: ${{ secrets.NPM_EMAIL }} | |
NPM_USER: ${{ secrets.NPM_USER }} | |
NPM_PASS: ${{ secrets.NPM_PASS }} | |
- name: Build | |
run: yarn build | |
lint-pr-title: | |
name: Lint PR Title (conventional-commit) | |
needs: prepare_dependencies | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- uses: ./.github/actions/install-dependencies | |
with: | |
NPM_EMAIL: ${{ secrets.NPM_EMAIL }} | |
NPM_USER: ${{ secrets.NPM_USER }} | |
NPM_PASS: ${{ secrets.NPM_PASS }} | |
- name: Validate PR title | |
run: echo "${{ github.event.pull_request.title }}" | npx commitlint | |
lint-code: | |
name: Lint code | |
needs: prepare_dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- uses: ./.github/actions/install-dependencies | |
with: | |
NPM_EMAIL: ${{ secrets.NPM_EMAIL }} | |
NPM_USER: ${{ secrets.NPM_USER }} | |
NPM_PASS: ${{ secrets.NPM_PASS }} | |
- name: Run linter | |
run: yarn lint | |
unit-tests: | |
name: Unit tests | |
needs: prepare_dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- uses: ./.github/actions/install-dependencies | |
with: | |
NPM_EMAIL: ${{ secrets.NPM_EMAIL }} | |
NPM_USER: ${{ secrets.NPM_USER }} | |
NPM_PASS: ${{ secrets.NPM_PASS }} | |
- name: Test | |
run: yarn test | |
- name: SonarCloud Scan | |
if: github.event.repository.name == 'storefront-nuxt2-magento2' | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
args: > | |
-Dsonar.organization=vuestorefront | |
-Dsonar.projectKey=vuestorefront_storefront-nuxt2-magento2 | |
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info | |
-Dsonar.coverage.exclusions=/__tests__/**,*.config.js | |
-Dsonar.cpd.exclusions=/__tests__/** | |
performance-tests: | |
name: Performance tests | |
needs: prepare_dependencies | |
runs-on: ubuntu-latest | |
if: github.event.repository.name == 'storefront-nuxt2-magento2' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- uses: ./.github/actions/install-dependencies | |
with: | |
NPM_EMAIL: ${{ secrets.NPM_EMAIL }} | |
NPM_USER: ${{ secrets.NPM_USER }} | |
NPM_PASS: ${{ secrets.NPM_PASS }} | |
- name: Setup environment variables | |
shell: bash | |
run: cp .github/workflows/public_env_info/ci .env | |
- name: Build | |
run: yarn build | |
- name: Lighthouse CI audit | |
run: yarn lhci:mobile | |
env: | |
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} |