@@ -2,20 +2,16 @@ name: CI
22
33on :
44 pull_request :
5- types :
6- - opened
7- - reopened
8- - synchronize
9- - ready_for_review
105 push :
11- branches : " main"
6+ branches :
7+ - " main"
128jobs :
139 test :
1410 runs-on : ubuntu-latest
1511
1612 steps :
1713 - name : Checkout code
18- uses : actions/checkout@v5
14+ uses : actions/checkout@v6
1915
2016 - name : Set up Ruby
2117 uses : ruby/setup-ruby@v1
@@ -25,10 +21,11 @@ jobs:
2521 - name : Install pnpm
2622 uses : pnpm/action-setup@v4
2723 with :
24+ version : 10.8.0
2825 run_install : false
2926
3027 - name : Setup Node
31- uses : actions/setup-node@v4
28+ uses : actions/setup-node@v6
3229 with :
3330 node-version-file : " .node-version"
3431 cache : ' pnpm'
@@ -40,10 +37,44 @@ jobs:
4037 run : bundle exec standardrb
4138
4239 - name : Run tests
43- run : |
44- bin/rails test:prepare
45- bin/rails db:test:prepare
46- bin/rails test
40+ run : bin/rails db:test:prepare test
41+
42+ verify_components :
43+ if : github.ref == 'refs/heads/main'
44+ runs-on : ubuntu-latest
45+
46+ steps :
47+ - name : Checkout code
48+ uses : actions/checkout@v6
49+
50+ - name : Set up Ruby
51+ uses : ruby/setup-ruby@v1
52+ with :
53+ bundler-cache : true
54+
55+ - name : Install pnpm
56+ uses : pnpm/action-setup@v4
57+ with :
58+ run_install : false
59+
60+ - name : Setup Node
61+ uses : actions/setup-node@v6
62+ with :
63+ node-version-file : " .node-version"
64+ cache : ' pnpm'
65+
66+ - name : Install dependencies
67+ run : pnpm install
68+
69+ - name : Build
70+ run : bin/rails g ruby_ui:component:all --force true
71+
72+ - uses : CatChen/check-git-status-action@v1
73+ with :
74+ fail-if-not-clean : true
75+ push-if-not-clean : false
76+ request-changes-if-not-clean : false
77+ targets : ' app'
4778
4879 docker-build :
4980 if : github.ref == 'refs/heads/main'
5485
5586 steps :
5687 - name : Checkout code
57- uses : actions/checkout@v5
88+ uses : actions/checkout@v6
5889
5990 - name : Login to GitHub Container Registry
6091 uses : docker/login-action@v3
@@ -69,17 +100,3 @@ jobs:
69100 imageName : ghcr.io/ruby-ui/web-devcontainer
70101 cacheFrom : ghcr.io/ruby-ui/web-devcontainer
71102 push : always
72-
73-
74- next-deploy :
75- if : github.ref == 'refs/heads/main'
76- needs : [test, docker-build]
77- runs-on : ubuntu-latest
78-
79- steps :
80- - name : Checkout code
81- uses : actions/checkout@v5
82- with :
83- fetch-depth : 0
84- - name : Deploy to Heroku Prod
85- run : git push https://heroku:${{ secrets.HEROKU_RUBYUI_API_KEY }}@git.heroku.com/rubyui-next.git HEAD:main
0 commit comments