File tree 1 file changed +50
-0
lines changed
1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Devcontainer smoke test
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ build :
7
+ name : Devcontainer smoke test
8
+
9
+ runs-on : ubuntu-latest
10
+ permissions :
11
+ contents : read
12
+ packages : write
13
+ strategy :
14
+ fail-fast : false
15
+ matrix :
16
+ DATABASE :
17
+ - sqlite3
18
+ - postgresql
19
+ - mysql
20
+ - trilogy
21
+
22
+ steps :
23
+ - name : Checkout (GitHub)
24
+ uses : actions/checkout@v3
25
+
26
+ - name : Login to GitHub Container Registry
27
+ uses : docker/login-action@v2
28
+ with :
29
+ registry : ghcr.io
30
+ username : ${{ github.repository_owner }}
31
+ password : ${{ secrets.GITHUB_TOKEN }}
32
+
33
+ - name : Set up Ruby 3.3
34
+ uses : ruby/setup-ruby@v1
35
+ with :
36
+ ruby-version : 3.3
37
+ bundler-cache : true
38
+
39
+ - name : Generate rails app
40
+ run : bundle exec railties/exe/rails new myapp --database="${{ matrix.DATABASE }}" --dev
41
+
42
+ - name : Test devcontainer
43
+ uses :
devcontainers/[email protected]
44
+ with :
45
+ subFolder : myapp
46
+ imageName : ghcr.io/rails/smoke-test-devcontainer
47
+ cacheFrom : ghcr.io/rails/smoke-test-devcontainer
48
+ imageTag : ${{ matrix.DATABASE }}
49
+ refFilterForPush : refs/heads/main
50
+ runCmd : bin/rails g scaffold Post && bin/rails db:migrate && bin/rails test
You can’t perform that action at this time.
0 commit comments