Catalog Sync #459
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: Catalog Sync | |
on: | |
push: | |
branches: | |
- main | |
- '*.x' | |
pull_request: | |
branches: [main] | |
schedule: | |
- cron: '15 */6 * * *' | |
workflow_dispatch: | |
# permissions: | |
# contents: read | |
jobs: | |
catalog-sync: | |
runs-on: ${{matrix.operating-system}} | |
strategy: | |
fail-fast: true | |
matrix: | |
operating-system: [ubuntu-latest] | |
php: [8.2] | |
name: PHP ${{ matrix.php }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Tailscale | |
uses: tailscale/github-action@v2 | |
with: | |
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }} | |
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }} | |
tags: tag:ci | |
- name: Check for tailscale is working | |
run: | |
tailscale status | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite | |
coverage: none | |
- name: Install Composer dependencies | |
run: composer install --prefer-dist --no-interaction --no-progress | |
# - name: Copy environment file | |
# run: cp .env.example .env | |
# - name: Generate app key | |
# run: php artisan key:generate | |
- name: Execute Catalog Sync | |
shell: bash | |
run: | | |
composer run env-test | |
composer run catalog-sync | |
env: | |
DB_HOST: ${{ secrets.DB_HOST }} | |
DB_PORT: ${{ secrets.DB_PORT }} | |
DB_DATABASE: ${{ secrets.DB_DATABASE }} | |
DB_USERNAME: ${{ secrets.DB_USERNAME }} | |
DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
MAGENTO_BASE_URL: ${{ secrets.MAGENTO_BASE_URL }} | |
MAGENTO_CONSUMER_KEY: ${{ secrets.MAGENTO_CONSUMER_KEY }} | |
MAGENTO_CONSUMER_SECRET: ${{ secrets.MAGENTO_CONSUMER_SECRET }} | |
MAGENTO_ACCESS_TOKEN: ${{ secrets.MAGENTO_ACCESS_TOKEN }} | |
MAGENTO_ACCESS_TOKEN_SECRET: ${{ secrets.MAGENTO_ACCESS_TOKEN_SECRET }} | |
SQLSRV_URL: ${{ secrets.SQLSRV_URL }} | |
SQLSRV_HOST: ${{ secrets.SQLSRV_HOST }} | |
SQLSRV_PORT: ${{ secrets.SQLSRV_PORT }} | |
SQLSRV_DATABASE: ${{ secrets.SQLSRV_DATABASE }} | |
SQLSRV_USERNAME: ${{ secrets.SQLSRV_USERNAME }} | |
SQLSRV_PASSWORD: ${{ secrets.SQLSRV_PASSWORD }} | |
- name: Execute tests | |
run: vendor/bin/phpunit |