Clear staging cloud projects #585
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: 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@v2.2.4 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
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 |