Skip to content

Commit eaeca63

Browse files
authored
Merge pull request #85 from rails/rm-new-organization
New organization for the features
2 parents f3bb12d + fd2cd61 commit eaeca63

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+321
-98
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM mcr.microsoft.com/devcontainers/base:1-bookworm
2+
3+
RUN apt-get update && apt-get install -y shellcheck

.devcontainer/devcontainer.json

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-in-docker
33
{
44
"name": "Docker in Docker",
5-
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/javascript-node:0-18",
5+
"build": {
6+
"dockerfile": "Dockerfile"
7+
},
78

89
"features": {
910
"ghcr.io/devcontainers/features/docker-in-docker:2": {
@@ -17,11 +18,27 @@
1718
// "forwardPorts": [],
1819

1920
// Use 'postCreateCommand' to run commands after the container is created.
20-
"postCreateCommand": "npm install -g @devcontainers/cli"
21+
"postCreateCommand": "npm install -g @devcontainers/cli",
2122

2223
// Configure tool-specific properties.
23-
// "customizations": {},
24+
"customizations": {
25+
"vscode": {
26+
"settings": {
27+
"json.schemas": [
28+
{
29+
"fileMatch": [
30+
"*/devcontainer-feature.json"
31+
],
32+
"url": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainerFeature.schema.json"
33+
}
34+
]
35+
},
36+
"extensions": [
37+
"mads-hartmann.bash-ide-vscode"
38+
]
39+
}
40+
},
2441

2542
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
26-
// "remoteUser": "root"
43+
"remoteUser": "node"
2744
}

.github/.devcontainer/features

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../features
1+
../../features/src

.github/workflows/release-features.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: devcontainers/action@v1
1919
with:
2020
publish-features: "true"
21-
base-path-to-features: "./features"
21+
base-path-to-features: "./features/src"
2222
features-namespace: "rails/devcontainer/features"
2323
env:
2424
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: "CI - Test Features"
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
test-autogenerated:
11+
runs-on: ubuntu-latest
12+
continue-on-error: true
13+
strategy:
14+
matrix:
15+
features:
16+
- bun
17+
- mysql-client
18+
- sqlite3
19+
- activestorage
20+
- postgres-client
21+
- ruby
22+
baseImage:
23+
- debian:latest
24+
- ubuntu:latest
25+
- mcr.microsoft.com/devcontainers/base:ubuntu
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: "Install latest devcontainer CLI"
30+
run: npm install -g @devcontainers/cli
31+
32+
- name: "Generating tests for '${{ matrix.features }}' against '${{ matrix.baseImage }}'"
33+
working-directory: features
34+
run: devcontainer features test --skip-scenarios -f ${{ matrix.features }} -i ${{ matrix.baseImage }} .
35+
36+
test-scenarios:
37+
runs-on: ubuntu-latest
38+
continue-on-error: true
39+
strategy:
40+
matrix:
41+
features:
42+
- activestorage
43+
- postgres-client
44+
- ruby
45+
steps:
46+
- uses: actions/checkout@v4
47+
48+
- name: "Install latest devcontainer CLI"
49+
run: npm install -g @devcontainers/cli
50+
51+
- name: "Generating tests for '${{ matrix.features }}' scenarios"
52+
working-directory: features
53+
run: devcontainer features test -f ${{ matrix.features }} --skip-autogenerated --skip-duplicated .
54+
55+
shellcheck:
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/checkout@v4
59+
60+
- name: "Install shellcheck"
61+
run: sudo apt-get update && sudo apt-get install -y shellcheck
62+
63+
- name: "Run shellcheck"
64+
working-directory: features
65+
run: find . -name "*.sh" -type f -exec shellcheck {} +

.github/workflows/test-ruby-feature.yaml

Lines changed: 0 additions & 32 deletions
This file was deleted.

features/bun/install.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

features/postgres-client/install.sh

Lines changed: 0 additions & 17 deletions
This file was deleted.

features/ruby/install.sh

Lines changed: 0 additions & 33 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)