|
45 | 45 | GH_TOKEN: ${{secrets.GH_TOKEN}}
|
46 | 46 | jobs:
|
47 | 47 | test:
|
48 |
| - if: 'contains(github.event.head_commit.message, ''-release'') == true' |
| 48 | + if: 'contains(github.event.head_commit.message, ''-d'') == true' |
49 | 49 | env:
|
50 | 50 | REDIS_URL: redis://localhost:6379
|
51 | 51 | CLICKHOUSE_URL: http://default:@localhost:8123
|
52 | 52 | POSTGRES_URL: http://test:test@localhost:5432/test
|
53 |
| - SHOULD_RELEASE: ${{ contains(github.event.head_commit.message, '-release') }} |
| 53 | + SHOULD_RELEASE: ${{ contains(github.event.head_commit.message, '-d') }} |
54 | 54 | name: build and test
|
55 | 55 | runs-on: ubuntu-latest
|
56 | 56 | steps:
|
@@ -88,73 +88,75 @@ jobs:
|
88 | 88 | - name: Install Deps
|
89 | 89 | run: pnpm -v && pnpm i && pnpm rebuild --recursive
|
90 | 90 |
|
| 91 | + - name: Install Playwright Browsers |
| 92 | + run: npx playwright install |
| 93 | + |
| 94 | + - name: Run Docker Compose (DB) |
| 95 | + run: docker-compose -f ./docker/docker-compose.yml pull && docker-compose -f ./docker/docker-compose.yml up --build -d |
| 96 | + |
| 97 | + - name: Create Tables |
| 98 | + run: npm -w @fiction/www exec -- fiction run generate |
| 99 | + |
| 100 | + - name: Run Type Check |
| 101 | + run: npm run types:ci |
| 102 | + |
| 103 | + - name: BUILD unit tests |
| 104 | + env: |
| 105 | + NODE_OPTIONS: --max_old_space_size=4096 |
| 106 | + run: npm exec -- vitest run build -u --no-file-parallelism |
| 107 | + |
| 108 | + - name: SPOT tests |
| 109 | + run: npm exec -- vitest run @fiction/core/plugin-user/test/userUpdate.ci.test.ts -u |
| 110 | + |
| 111 | + - name: STABLE unit tests |
| 112 | + run: npm exec -- vitest run ci -u |
| 113 | + |
| 114 | + - name: E2E/UI unit tests |
| 115 | + run: npm exec -- vitest run e2e -u |
| 116 | + |
| 117 | + - name: Install Build Packages |
| 118 | + if: env.SHOULD_RELEASE |
| 119 | + run: pnpm add tsup cross-env --global |
| 120 | + |
| 121 | + - name: Build Bundles |
| 122 | + if: env.SHOULD_RELEASE |
| 123 | + run: npm exec -- fiction run bundle |
| 124 | + |
| 125 | + - name: Render Apps |
| 126 | + if: env.SHOULD_RELEASE |
| 127 | + run: npm exec -- fiction run render |
| 128 | + |
| 129 | + - name: Install FlyCtl |
| 130 | + if: env.SHOULD_RELEASE |
| 131 | + uses: superfly/flyctl-actions/setup-flyctl@master |
| 132 | + |
| 133 | + - name: DIST unit tests |
| 134 | + if: env.SHOULD_RELEASE |
| 135 | + run: npm exec -- vitest run dist -u |
| 136 | + |
91 | 137 | - name: Debug Git Config
|
| 138 | + if: env.SHOULD_RELEASE |
92 | 139 | run: |
|
93 | 140 | git config --list
|
94 | 141 | git remote -v
|
95 | 142 |
|
96 | 143 | - name: Release Code
|
| 144 | + if: env.SHOULD_RELEASE |
97 | 145 | run: |
|
98 | 146 | npm run i:lockfile && npm run release
|
99 | 147 |
|
100 |
| - # - name: Install Playwright Browsers |
101 |
| - # run: npx playwright install |
102 |
| - |
103 |
| - # - name: Run Docker Compose (DB) |
104 |
| - # run: docker-compose -f ./docker/docker-compose.yml pull && docker-compose -f ./docker/docker-compose.yml up --build -d |
105 |
| - |
106 |
| - # - name: Create Tables |
107 |
| - # run: npm -w @fiction/www exec -- fiction run generate |
108 |
| - |
109 |
| - # - name: Run Type Check |
110 |
| - # run: npm run types:ci |
111 |
| - |
112 |
| - # - name: BUILD unit tests |
113 |
| - # env: |
114 |
| - # NODE_OPTIONS: --max_old_space_size=4096 |
115 |
| - # run: npm exec -- vitest run build -u --no-file-parallelism |
116 |
| - |
117 |
| - # - name: SPOT tests |
118 |
| - # run: npm exec -- vitest run @fiction/core/plugin-user/test/userUpdate.ci.test.ts -u |
119 |
| - |
120 |
| - # - name: STABLE unit tests |
121 |
| - # run: npm exec -- vitest run ci -u |
122 |
| - |
123 |
| - # - name: E2E/UI unit tests |
124 |
| - # run: npm exec -- vitest run e2e -u |
125 |
| - |
126 |
| - # - name: Install Build Packages |
127 |
| - # if: env.SHOULD_RELEASE |
128 |
| - # run: pnpm add tsup cross-env --global |
129 |
| - |
130 |
| - # - name: Build Bundles |
131 |
| - # if: env.SHOULD_RELEASE |
132 |
| - # run: npm exec -- fiction run bundle |
133 |
| - |
134 |
| - # - name: Render Apps |
135 |
| - # if: env.SHOULD_RELEASE |
136 |
| - # run: npm exec -- fiction run render |
137 |
| - |
138 |
| - # - name: Install FlyCtl |
139 |
| - # if: env.SHOULD_RELEASE |
140 |
| - # uses: superfly/flyctl-actions/setup-flyctl@master |
141 |
| - |
142 |
| - # - name: DIST unit tests |
143 |
| - # if: env.SHOULD_RELEASE |
144 |
| - # run: npm exec -- vitest run dist -u |
145 |
| - |
146 |
| - # - name: Post Notification |
147 |
| - # if: failure() |
148 |
| - # id: slack |
149 |
| - # uses: slackapi/[email protected] |
150 |
| - # with: |
151 |
| - # # This data can be any valid JSON from a previous step in the GitHub Action |
152 |
| - # payload: | |
153 |
| - # { |
154 |
| - # "icon_emoji": "${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}", |
155 |
| - # "username": "supereon", |
156 |
| - # "channel": "#notify", |
157 |
| - # "text": "Workflow *${{ github.workflow }}* on *${{ github.ref }}* (commit: ${{ github.sha }}) completed with status: *${{ job.status }}*. <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run>" |
158 |
| - # } |
159 |
| - # env: |
160 |
| - # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 148 | + - name: Post Notification |
| 149 | + if: failure() |
| 150 | + id: slack |
| 151 | + |
| 152 | + with: |
| 153 | + # This data can be any valid JSON from a previous step in the GitHub Action |
| 154 | + payload: | |
| 155 | + { |
| 156 | + "icon_emoji": "${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}", |
| 157 | + "username": "supereon", |
| 158 | + "channel": "#notify", |
| 159 | + "text": "Workflow *${{ github.workflow }}* on *${{ github.ref }}* (commit: ${{ github.sha }}) completed with status: *${{ job.status }}*. <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run>" |
| 160 | + } |
| 161 | + env: |
| 162 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
0 commit comments