Clear staging cloud projects #668
This file contains hidden or 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: Clear staging cloud projects | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 7 * * 0-6' | |
| repository_dispatch: | |
| types: [automation-tests-event] | |
| jobs: | |
| run-functional-tests: | |
| if: ${{ github.event_name != 'repository_dispatch' }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | |
| - uses: actions/setup-node@v4.2.0 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Prepare saleor CLI | |
| run: pnpm build | |
| - name: Write config file | |
| id: write-config-file | |
| env: | |
| CLI_ACCESS_TOKEN: ${{ secrets.CLI_ACCESS_TOKEN }} | |
| CLI_GITHUB_TOKEN: ${{ secrets.CLI_GITHUB_TOKEN }} | |
| CLI_VERCEL_TOKEN: ${{ secrets.CLI_VERCEL_TOKEN }} | |
| TEST_COMMAND: 'node dist/saleor.js' | |
| run: echo '{"token":"${{ secrets.CLI_ACCESS_TOKEN }}","telemetry":"false", "github_token":"${{ secrets.CLI_GITHUB_TOKEN }}", "vercel_token":"${{ secrets.CLI_VERCEL_TOKEN }}" }' > ~/.config/saleor.json | |
| - name: clear cloud projects | |
| env: | |
| SALEOR_CLI_ENV: staging | |
| RUN_FUNCTIONAL_TESTS: true | |
| run: | | |
| pnpm vitest run test/clear_cloud.test.ts |