-
Notifications
You must be signed in to change notification settings - Fork 21.5k
99 lines (81 loc) · 3.38 KB
/
devcontainer-smoke-test.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Devcontainer smoke test
on: [push, pull_request]
jobs:
build:
name: Devcontainer smoke test
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Ruby 3.3
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- name: Generate rails app sqlite3
run: bundle exec railties/exe/rails new myapp_sqlite --database="sqlite3" --dev
- name: Test devcontainer sqlite3
uses: devcontainers/ci@v0.3
with:
subFolder: myapp_sqlite
imageName: ghcr.io/rails/smoke-test-devcontainer
cacheFrom: ghcr.io/rails/smoke-test-devcontainer
imageTag: sqlite3
push: ${{ github.repository_owner == 'rails' && 'filter' || 'never' }}
refFilterForPush: refs/heads/main
runCmd: bin/rails g scaffold Post && bin/rails db:migrate && bin/rails test
- name: Stop all containers
run: docker ps -q | xargs docker stop
- name: Generate rails app postgresql
run: bundle exec railties/exe/rails new myapp_postgresql --database="postgresql" --dev
- name: Test devcontainer postgresql
uses: devcontainers/ci@v0.3
with:
subFolder: myapp_postgresql
imageName: ghcr.io/rails/smoke-test-devcontainer
cacheFrom: ghcr.io/rails/smoke-test-devcontainer
imageTag: postgresql
push: ${{ github.repository_owner == 'rails' && 'filter' || 'never' }}
refFilterForPush: refs/heads/main
runCmd: bin/rails g scaffold Post && bin/rails db:migrate && bin/rails test
- name: Stop all containers
run: docker ps -q | xargs docker stop
- name: Generate rails app mysql
run: bundle exec railties/exe/rails new myapp_mysql --database="mysql" --dev
- name: Test devcontainer mysql
uses: devcontainers/ci@v0.3
with:
subFolder: myapp_mysql
imageName: ghcr.io/rails/smoke-test-devcontainer
cacheFrom: ghcr.io/rails/smoke-test-devcontainer
imageTag: mysql
push: ${{ github.repository_owner == 'rails' && 'filter' || 'never' }}
refFilterForPush: refs/heads/main
runCmd: bin/rails g scaffold Post && bin/rails db:migrate && bin/rails test
- name: Stop all containers
run: docker ps -q | xargs docker stop
- name: Generate rails app trilogy
run: bundle exec railties/exe/rails new myapp_trilogy --database="trilogy" --dev
- name: Test devcontainer trilogy
uses: devcontainers/ci@v0.3
with:
subFolder: myapp_trilogy
imageName: ghcr.io/rails/smoke-test-devcontainer
cacheFrom: ghcr.io/rails/smoke-test-devcontainer
imageTag: trilogy
push: ${{ github.repository_owner == 'rails' && 'filter' || 'never' }}
refFilterForPush: refs/heads/main
runCmd: bin/rails g scaffold Post && bin/rails db:migrate && bin/rails test
- name: Stop all containers
run: docker ps -q | xargs docker stop