-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (67 loc) · 2.11 KB
/
ci-cd-pipeline-main.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# This workflow will run whenever commits land on the main branch.
#
# It will run tests and a few safety checks.
#
# If everything passes it can be set to auto-deploy to your production app on Heroku.
#
# This workflow is primarily meant to be triggered automatically, but it can be run manually.
name: " 🎥 Main CI (prod)"
on:
workflow_dispatch:
push:
branches: [ "main" ]
jobs:
# NOTE: This is here just to make the workflow visualization layout better.
# Without it the layout is really bad and confusing.
calculate_matrix:
name: 🤷 Fake Matrix
runs-on: ubuntu-latest
steps:
- name: Do Nothing
run: echo "This is a useless step that just helps things look nicer..."
shell: bash
minitest:
name: 🧪 Minitest
uses: ./.github/workflows/_run_tests.yml
secrets: inherit
standardrb:
name: 🔬 Standardrb
uses: ./.github/workflows/_standardrb.yml
secrets: inherit
needs: calculate_matrix
permissions:
checks: write
contents: read
db_schema:
name: 🔎 DB Schema
uses: ./.github/workflows/_database_schema_check.yml
secrets: inherit
needs: calculate_matrix
combine_runtime_logs:
name: 🪵 Combine Runtime Logs for Parallel Tests
uses: ./.github/workflows/_combine_runtime_logs.yml
secrets: inherit
needs: [minitest]
if: ${{ always() }}
combine_coverage_data:
name: ♻️ SimpleCov
uses: ./.github/workflows/_combine_coverage_data.yml
secrets: inherit
needs: [minitest]
if: ${{ always() }}
combine_summary_logs:
name: 📊 Test Results
uses: ./.github/workflows/_combine_summary_logs.yml
secrets: inherit
needs: [minitest]
if: ${{ always() }}
# If you'd like to auto-deploy to your production environment you can uncomment this next block.
# You'll need to set HEROKU_EMAIL and HEROKU_API_KEY in your repo secrets.
# Be sure to set the app name correctly below.
deploy:
name: 🚢 Deploy to Heroku
uses: ./.github/workflows/_deploy_heroku.yml
needs: [minitest, standardrb, db_schema]
secrets: inherit
with:
heroku-app-name: "bullettrain-co"