-
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.
- Loading branch information
Showing
25 changed files
with
1,946 additions
and
1,631 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 |
---|---|---|
|
@@ -29,58 +29,30 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
test_suit: | ||
- test_new_image_ | ||
- test_multiple_services_ | ||
- test_SERVICES_ | ||
- test_jobs_ | ||
- test_MANIFEST_ | ||
- test_no_running_tasks_ | ||
- test_rollback_ | ||
- test_options_ | ||
- test_CLEANUP_IMAGES_ | ||
- test_login_ | ||
- gantry_cleanup_images_spec.sh | ||
- gantry_entrypoint.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_options_spec.sh | ||
- gantry_rollback_spec.sh | ||
- gantry_simple_spec.sh | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- name: Login to GitHub Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ github.token }} | ||
- 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: Run tests | ||
run: | | ||
export GANTRY_TEST_ENABLE_TESTS="${{ matrix.test_suit }}" | ||
./tests/run_all_tests.sh "${{ github.repository }}-test" "ghcr.io" "${{ github.repository_owner }}" "${{ github.token }}" | ||
bash shellspec --pattern tests/${{ matrix.test_suit }} | ||
clean-ghcr-tests: | ||
name: Delete old tests container images | ||
runs-on: ubuntu-latest | ||
needs: | ||
- tests | ||
steps: | ||
- name: Delete old test images | ||
uses: snok/container-retention-policy@v2 | ||
with: | ||
image-names: "${{ github.repository }}-test" | ||
# leave some margins in case multiple actions run in parallel | ||
cut-off: 5 minutes ago UTC | ||
account-type: personal | ||
token: ${{ secrets.TOKEN_DELETE_GHCR_IMAGES }} | ||
keep-at-least: 0 | ||
skip-tags: latest, development | ||
filter-tags: "for-test-*" | ||
dry-run: False | ||
- name: Delete untagged images | ||
uses: snok/container-retention-policy@v2 | ||
with: | ||
image-names: "${{ github.repository }}-test" | ||
cut-off: 1 second ago UTC | ||
account-type: personal | ||
token: ${{ secrets.TOKEN_DELETE_GHCR_IMAGES }} | ||
keep-at-least: 0 | ||
untagged-only: True | ||
skip-tags: latest, development | ||
dry-run: False |
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 |
---|---|---|
|
@@ -36,31 +36,32 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
test_suit: | ||
- test_new_image_ | ||
- test_multiple_services_ | ||
- test_SERVICES_ | ||
- test_jobs_ | ||
- test_MANIFEST_ | ||
- test_no_running_tasks_ | ||
- test_rollback_ | ||
- test_options_ | ||
- test_CLEANUP_IMAGES_ | ||
- test_login_ | ||
- gantry_cleanup_images_spec.sh | ||
- gantry_entrypoint.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_options_spec.sh | ||
- gantry_rollback_spec.sh | ||
- gantry_simple_spec.sh | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- name: Login to GitHub Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ github.token }} | ||
- 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: Run tests | ||
run: | | ||
export GANTRY_TEST_ENABLE_TESTS="${{ matrix.test_suit }}" | ||
./tests/run_all_tests.sh "${{ github.repository }}-test" "ghcr.io" "${{ github.repository_owner }}" "${{ github.token }}" | ||
bash shellspec --pattern tests/${{ matrix.test_suit }} | ||
build_and_push: | ||
name: Build and push Docker image | ||
|
@@ -106,42 +107,4 @@ jobs: | |
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
provenance: false | ||
# - name: Post push tests | ||
# run: | | ||
# echo "Start running tests"; | ||
# TAG=$(echo "${{ steps.meta.outputs.tags }}" | grep "ghcr.io" | grep "dev-" | tr '\n' ' ' | cut -f1 -d ' ') | ||
# echo "Using tag ${TAG}"; | ||
# export GANTRY_TEST_CONTAINER_REPO_TAG="${TAG}"; | ||
# export GANTRY_TEST_ENABLE_TESTS="test_new_image_"; | ||
# ./tests/run_all_tests.sh "${{ github.repository }}-test" "ghcr.io" "${{ github.repository_owner }}" "${{ github.token }}"; | ||
# echo "Done running tests"; | ||
|
||
clean-ghcr-tests: | ||
name: Delete old tests container images | ||
runs-on: ubuntu-latest | ||
needs: | ||
- tests | ||
steps: | ||
- name: Delete old test images | ||
uses: snok/container-retention-policy@v2 | ||
with: | ||
image-names: "${{ github.repository }}-test" | ||
# leave some margins in case multiple actions run in parallel | ||
cut-off: 5 minutes ago UTC | ||
account-type: personal | ||
token: ${{ secrets.TOKEN_DELETE_GHCR_IMAGES }} | ||
keep-at-least: 0 | ||
skip-tags: latest, development | ||
filter-tags: "for-test-*" | ||
dry-run: False | ||
- name: Delete untagged images | ||
uses: snok/container-retention-policy@v2 | ||
with: | ||
image-names: "${{ github.repository }}-test" | ||
cut-off: 1 second ago UTC | ||
account-type: personal | ||
token: ${{ secrets.TOKEN_DELETE_GHCR_IMAGES }} | ||
keep-at-least: 0 | ||
untagged-only: True | ||
skip-tags: latest, development | ||
dry-run: False |
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 |
---|---|---|
|
@@ -31,31 +31,32 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
test_suit: | ||
- test_new_image_ | ||
- test_multiple_services_ | ||
- test_SERVICES_ | ||
- test_jobs_ | ||
- test_MANIFEST_ | ||
- test_no_running_tasks_ | ||
- test_rollback_ | ||
- test_options_ | ||
- test_CLEANUP_IMAGES_ | ||
- test_login_ | ||
- gantry_cleanup_images_spec.sh | ||
- gantry_entrypoint.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_options_spec.sh | ||
- gantry_rollback_spec.sh | ||
- gantry_simple_spec.sh | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- name: Login to GitHub Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ github.token }} | ||
- 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: Run tests | ||
run: | | ||
export GANTRY_TEST_ENABLE_TESTS="${{ matrix.test_suit }}" | ||
./tests/run_all_tests.sh "${{ github.repository }}-test" "ghcr.io" "${{ github.repository_owner }}" "${{ github.token }}" | ||
bash shellspec --pattern tests/${{ matrix.test_suit }} | ||
build_and_push: | ||
name: Build and push Docker image | ||
|
@@ -99,42 +100,4 @@ jobs: | |
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
provenance: false | ||
# - name: Post push tests | ||
# run: | | ||
# echo "Start running tests"; | ||
# TAG=$(echo "${{ steps.meta.outputs.tags }}" | grep "ghcr.io" | tr '\n' ' ' | cut -f1 -d ' ') | ||
# echo "Using tag ${TAG}"; | ||
# export GANTRY_TEST_CONTAINER_REPO_TAG="${TAG}"; | ||
# export GANTRY_TEST_ENABLE_TESTS="test_new_image_"; | ||
# ./tests/run_all_tests.sh "${{ github.repository }}-test" "ghcr.io" "${{ github.repository_owner }}" "${{ github.token }}"; | ||
# echo "Done running tests"; | ||
|
||
clean-ghcr-tests: | ||
name: Delete old tests container images | ||
runs-on: ubuntu-latest | ||
needs: | ||
- tests | ||
steps: | ||
- name: Delete old test images | ||
uses: snok/container-retention-policy@v2 | ||
with: | ||
image-names: "${{ github.repository }}-test" | ||
# leave some margins in case multiple actions run in parallel | ||
cut-off: 5 minutes ago UTC | ||
account-type: personal | ||
token: ${{ secrets.TOKEN_DELETE_GHCR_IMAGES }} | ||
keep-at-least: 0 | ||
skip-tags: latest, development | ||
filter-tags: "for-test-*" | ||
dry-run: False | ||
- name: Delete untagged images | ||
uses: snok/container-retention-policy@v2 | ||
with: | ||
image-names: "${{ github.repository }}-test" | ||
cut-off: 1 second ago UTC | ||
account-type: personal | ||
token: ${{ secrets.TOKEN_DELETE_GHCR_IMAGES }} | ||
keep-at-least: 0 | ||
untagged-only: True | ||
skip-tags: latest, development | ||
dry-run: False |
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,10 @@ | ||
--helperdir tests | ||
--require spec_helper | ||
--require spec_gantry_test_helper | ||
--default-path tests | ||
|
||
## kcov (coverage) options | ||
--kcov-options "--include-path=src --path-strip-level=1" | ||
--kcov-options "--include-pattern=.sh" | ||
# --kcov-options "--exclude-pattern=/.shellspec,/spec/,/coverage/,/report/,/tests,/.shellcheckrc" | ||
|
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.