-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from shizunge/parallel
Add `GANTRY_UPDATE_NUM_WORKERS` and other fixes
- Loading branch information
Showing
27 changed files
with
1,548 additions
and
884 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
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 |
---|---|---|
|
@@ -30,17 +30,17 @@ jobs: | |
matrix: | ||
test_suit: | ||
- gantry_cleanup_images_spec.sh | ||
- gantry_entrypoint_spec.sh | ||
- gantry_common_options_spec.sh | ||
- gantry_filters_spec.sh | ||
- gantry_job_spec.sh | ||
- gantry_login_spec.sh | ||
- gantry_manifest_spec.sh | ||
- gantry_multiple_services_spec.sh | ||
- gantry_no_running_tasks_spec.sh | ||
- gantry_notify_spec.sh | ||
- gantry_options_spec.sh | ||
- gantry_parallel_spec.sh | ||
- gantry_rollback_spec.sh | ||
- gantry_simple_spec.sh | ||
- gantry_service_multiple_spec.sh | ||
- gantry_service_no_running_tasks_spec.sh | ||
- gantry_service_single_spec.sh | ||
- gantry_update_options_spec.sh | ||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
|
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 |
---|---|---|
|
@@ -30,24 +30,24 @@ jobs: | |
set +e | ||
tests: | ||
name: Run tests | ||
name: Test script | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test_suit: | ||
- gantry_cleanup_images_spec.sh | ||
- gantry_entrypoint_spec.sh | ||
- gantry_common_options_spec.sh | ||
- gantry_filters_spec.sh | ||
- gantry_job_spec.sh | ||
- gantry_login_spec.sh | ||
- gantry_manifest_spec.sh | ||
- gantry_multiple_services_spec.sh | ||
- gantry_no_running_tasks_spec.sh | ||
- gantry_notify_spec.sh | ||
- gantry_options_spec.sh | ||
- gantry_parallel_spec.sh | ||
- gantry_rollback_spec.sh | ||
- gantry_simple_spec.sh | ||
- gantry_service_multiple_spec.sh | ||
- gantry_service_no_running_tasks_spec.sh | ||
- gantry_service_single_spec.sh | ||
- gantry_update_options_spec.sh | ||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
|
@@ -111,4 +111,49 @@ jobs: | |
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
provenance: false | ||
- name: Extract tag | ||
run: | | ||
TAGS="${{ steps.meta.outputs.tags }}" | ||
for TAG in ${TAGS}; do | ||
if echo "${TAG}" | grep -q "ghcr.io/${{ github.repository }}-development:dev-"; then | ||
echo "TAG=${TAG}" | ||
echo "${TAG}" > tag.txt | ||
break; | ||
fi | ||
done | ||
- name: Store tag | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: tag | ||
path: tag.txt | ||
|
||
|
||
container_tests: | ||
name: Test container | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build_and_push | ||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- name: Install shellspec | ||
run: | | ||
mkdir -p ~/shellspec | ||
cd ~/shellspec | ||
git clone https://github.com/shellspec/shellspec.git | ||
ln -s ~/shellspec/shellspec/shellspec /usr/local/bin/shellspec | ||
echo -n "shellspec version: " | ||
shellspec --version | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
- name: Load tag | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: tag | ||
- name: Run tests | ||
run: | | ||
export DOCKERHUB_PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }} | ||
export DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }} | ||
export GANTRY_TEST_CONTAINER_REPO_TAG=$(cat tag.txt) | ||
echo "GANTRY_TEST_CONTAINER_REPO_TAG=${GANTRY_TEST_CONTAINER_REPO_TAG}" | ||
bash shellspec --jobs 50 --tag "container_test:true" |
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 |
---|---|---|
|
@@ -27,22 +27,6 @@ jobs: | |
tests: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test_suit: | ||
- gantry_cleanup_images_spec.sh | ||
- gantry_entrypoint_spec.sh | ||
- gantry_filters_spec.sh | ||
- gantry_job_spec.sh | ||
- gantry_login_spec.sh | ||
- gantry_manifest_spec.sh | ||
- gantry_multiple_services_spec.sh | ||
- gantry_no_running_tasks_spec.sh | ||
- gantry_notify_spec.sh | ||
- gantry_options_spec.sh | ||
- gantry_rollback_spec.sh | ||
- gantry_simple_spec.sh | ||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
|
@@ -60,7 +44,7 @@ jobs: | |
run: | | ||
export DOCKERHUB_PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }} | ||
export DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }} | ||
bash shellspec --pattern tests/${{ matrix.test_suit }} | ||
bash shellspec --jobs 50 | ||
build_and_push: | ||
name: Build and push Docker image | ||
|
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
.shellspec-quick.log | ||
coverage |
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
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
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
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
Oops, something went wrong.