Skip to content

update test for soft dependency #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 10 additions & 22 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,26 @@ on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
features: [
"pip-test"
]
baseImage:
[
"mcr.microsoft.com/devcontainers/base:ubuntu-22.04"
]
steps:
- uses: actions/checkout@v2

- name: "Install latest devcontainer CLI"
run: npm install -g @devcontainers/cli

- name: "Generating tests for '${{ matrix.features }}' against '${{ matrix.baseImage }}'"
run: devcontainer features test -f ${{ matrix.features }} -i ${{ matrix.baseImage }} .

test-global:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2

# - name: "Install latest devcontainer CLI"
# run: npm install -g @devcontainers/cli

- name: "Install latest devcontainer CLI"
run: npm install -g @devcontainers/cli
run: |
git clone --depth 1 --branch main https://github.com/devcontainers/cli.git &&
cd cli &&
yarn &&
yarn compile &&
npm link

- name: "Testing global scenarios"
run: devcontainer features test --global-scenarios-only .
2 changes: 1 addition & 1 deletion src/pip-test/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"version": "1.0.0",
"description": "Testing installsAfter",
"installsAfter": [
"python"
"ghcr.io/devcontainers/features/python"
]
}
File renamed without changes.
5 changes: 0 additions & 5 deletions test/_global/scenario-without-python.sh

This file was deleted.

8 changes: 1 addition & 7 deletions test/_global/scenarios.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
{
"scenario-without-python": {
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-22.04",
"features": {
"pip-test": {}
}
},
"scenario-with-python": {
"pip-test": {
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-22.04",
"features": {
"ghcr.io/devcontainers/features/python": {},
Expand Down
6 changes: 2 additions & 4 deletions test/pip-test/test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/bin/bash
set -e
source dev-container-features-test-lib
check "version" pip --version
reportResults

echo "Nothing doing... never gets here"