Skip to content

Commit 4aea1b2

Browse files
committed
Add test for bun, mysql-client, and sqlite3 features
1 parent d70e3c1 commit 4aea1b2

File tree

5 files changed

+66
-0
lines changed

5 files changed

+66
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
baseImage:
20+
- debian:latest
21+
- ubuntu:latest
22+
- mcr.microsoft.com/devcontainers/base:ubuntu
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: "Install latest devcontainer CLI"
27+
run: npm install -g @devcontainers/cli
28+
29+
- name: "Generating tests for '${{ matrix.features }}' against '${{ matrix.baseImage }}'"
30+
working-directory: features
31+
run: devcontainer features test --skip-scenarios -f ${{ matrix.features }} -i ${{ matrix.baseImage }} .

features/src/bun/install.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,10 @@ set -e
33

44
USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"
55

6+
if ! command -v curl &> /dev/null; then
7+
apt update && apt install -y curl unzip
8+
fi
9+
610
su ${USERNAME} -c "curl -fsSL https://bun.sh/install | bash"
11+
12+
rm -rf /var/lib/apt/lists/*

features/test/bun/test.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
set -e
3+
4+
source dev-container-features-test-lib
5+
6+
check "Bun is in the PATH" bash -c "which bun"
7+
check "Bun is installed" bash -c "bun --version"
8+
9+
reportResults

features/test/mysql-client/test.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -e
3+
4+
source dev-container-features-test-lib
5+
6+
check "Mysql client is installed" bash -c "mysql --version"
7+
check "Mysql client is in the PATH" bash -c "which mysql"
8+
check "libmysqlclient-dev is installed" bash -c "dpkg -l | grep libmysqlclient-dev"
9+
10+
reportResults

features/test/sqlite3/test.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -e
3+
4+
source dev-container-features-test-lib
5+
6+
check "Sqlite3 is installed" bash -c "sqlite3 --version"
7+
check "Sqlite3 is in the PATH" bash -c "which sqlite3"
8+
check "Sqlite3-dev is installed" bash -c "dpkg -l | grep sqlite3-dev"
9+
10+
reportResults

0 commit comments

Comments
 (0)