-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Test Gitea | ||
|
||
on: | ||
pull_request: | ||
branches: '*' | ||
push: | ||
branches: | ||
- main | ||
- zach-test | ||
|
||
# Needed until we can incorporate docker startup into the executor container | ||
env: | ||
DOCKER_HOST: unix:///var/run/dind.sock | ||
|
||
jobs: | ||
test: | ||
name: "Run Gitea package registry test" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Clone project repository" | ||
uses: actions/checkout@v3 | ||
- name: "Install Python" | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- name: "Print Python version" | ||
run: python3 --version | ||
- name: "Install shiv" | ||
run: pip install shiv | ||
- name: "Generate build version file" | ||
run: ./scripts/create_build_tag_file.sh | ||
- name: "Build local shiv package" | ||
run: ./scripts/build_shiv_package.sh | ||
- name: Start dockerd # Also needed until we can incorporate into the executor | ||
run: | | ||
dockerd -H $DOCKER_HOST --userland-proxy=false & | ||
sleep 5 | ||
- name: "Run smoke tests" | ||
run: ./tests/gitea/test.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then | ||
set -x | ||
fi | ||
# Dump environment variables for debugging | ||
echo "Environment variables:" | ||
env | ||
# Basic simple test of stack-orchestrator functionality | ||
echo "Running stack-orchestrator gitea test" | ||
# Bit of a hack, test the most recent package | ||
TEST_TARGET_SO=$( ls -t1 ./package/laconic-so* | head -1 ) | ||
# Set a non-default repo dir | ||
export CERC_REPO_BASE_DIR=~/stack-orchestrator-gitea-test | ||
echo "Testing this package: $TEST_TARGET_SO" | ||
echo "Test version command" | ||
reported_version_string=$( $TEST_TARGET_SO version ) | ||
echo "Version reported is: ${reported_version_string}" | ||
echo "Cloning repositories into: $CERC_REPO_BASE_DIR" | ||
rm -rf $CERC_REPO_BASE_DIR | ||
mkdir -p $CERC_REPO_BASE_DIR | ||
|
||
$TEST_TARGET_SO --stack build-support build-containers | ||
$TEST_TARGET_SO --stack package-registry setup-repositories | ||
$TEST_TARGET_SO --stack package-registry build-containers | ||
$TEST_TARGET_SO --stack package-registry deploy-system up | ||
# TODO: test that we can use the deployed container somehow | ||
# Clean up | ||
$TEST_TARGET_SO --stack package-registry deploy-system down | ||
echo "Test passed" |