Skip to content

Add runArgs for ports #9

Add runArgs for ports

Add runArgs for ports #9

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test-and-package:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Java and sbt
uses: guardian/setup-scala@v1
# Required by the docker tests
- name: Set up Docker
uses: docker/setup-docker-action@v4
# The docker tests use `npx` to execute the devcontainers-cli package
- uses: actions/setup-node@v6
with:
node-version: 24
- name: Test and package
run: sbt test cli/universal:packageBin
- name: Find package file
id: find-package
run: |
ls -la cli/target/universal || true
PACKAGE_FILE=$(ls cli/target/universal/devenv-*.zip)
if [[ ! -f "$PACKAGE_FILE" ]]; then
echo "ERROR: package not found: $PACKAGE_FILE"
exit 1
fi
echo "package_file=$PACKAGE_FILE" >> $GITHUB_OUTPUT
echo "package_name=$(basename $PACKAGE_FILE)" >> $GITHUB_OUTPUT
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: devenv-package
path: ${{ steps.find-package.outputs.package_file }}
retention-days: 30
- name: Extract packaged app binary
run: |
PACKAGE_FILE="${{ steps.find-package.outputs.package_file }}"
PACKAGE_DIR=$(basename "$PACKAGE_FILE" .zip)
unzip -q "$PACKAGE_FILE" -d .
echo "DEVENV_BIN=$(pwd)/$PACKAGE_DIR/bin/devenv" >> $GITHUB_ENV
- name: Run generation tests
working-directory: generation-tests
env:
DEVENV_BIN: ${{ env.DEVENV_BIN }}
run: ./run-tests.sh