-
Notifications
You must be signed in to change notification settings - Fork 22
45 lines (39 loc) · 1.31 KB
/
clear-staging-cloud.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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