-
Notifications
You must be signed in to change notification settings - Fork 5
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 #74 from shizunge/readme
Readme
- Loading branch information
Showing
32 changed files
with
2,946 additions
and
1,542 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 |
---|---|---|
|
@@ -27,8 +27,8 @@ jobs: | |
shellcheck src/*.sh tests/*.sh | ||
set +e | ||
tests: | ||
name: Run tests | ||
test_scripts: | ||
name: Test scripts | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
@@ -37,6 +37,8 @@ jobs: | |
- gantry_cleanup_images_spec.sh | ||
- gantry_common_options_spec.sh | ||
- gantry_filters_spec.sh | ||
- gantry_jobs_spec.sh | ||
- gantry_login_docker_config_spec.sh | ||
- gantry_login_negative_spec.sh | ||
- gantry_login_spec.sh | ||
- gantry_manifest_spec.sh | ||
|
@@ -64,3 +66,26 @@ jobs: | |
run: | | ||
bash shellspec --pattern tests/${{ matrix.test_suit }} | ||
test_container: | ||
name: Test container | ||
runs-on: ubuntu-latest | ||
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: Run container tests | ||
run: | | ||
export GANTRY_TEST_CONTAINER=true | ||
export GANTRY_TEST_CONTAINER_REPO_TAG= | ||
echo "GANTRY_TEST_CONTAINER=${GANTRY_TEST_CONTAINER}" | ||
echo "GANTRY_TEST_CONTAINER_REPO_TAG=${GANTRY_TEST_CONTAINER_REPO_TAG}" | ||
bash shellspec --jobs 50 |
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,8 +30,8 @@ jobs: | |
shellcheck src/*.sh tests/*.sh | ||
set +e | ||
tests: | ||
name: Test script | ||
test_scripts: | ||
name: Test scripts | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
@@ -40,6 +40,8 @@ jobs: | |
- gantry_cleanup_images_spec.sh | ||
- gantry_common_options_spec.sh | ||
- gantry_filters_spec.sh | ||
- gantry_jobs_spec.sh | ||
- gantry_login_docker_config_spec.sh | ||
- gantry_login_negative_spec.sh | ||
- gantry_login_spec.sh | ||
- gantry_manifest_spec.sh | ||
|
@@ -65,17 +67,40 @@ jobs: | |
uses: actions/checkout@v4 | ||
- name: Run tests | ||
run: | | ||
export DOCKERHUB_PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }} | ||
export DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }} | ||
bash shellspec --pattern tests/${{ matrix.test_suit }} | ||
test_container: | ||
name: Test container | ||
runs-on: ubuntu-latest | ||
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: Run container tests | ||
run: | | ||
export GANTRY_TEST_CONTAINER=true | ||
export GANTRY_TEST_CONTAINER_REPO_TAG= | ||
echo "GANTRY_TEST_CONTAINER=${GANTRY_TEST_CONTAINER}" | ||
echo "GANTRY_TEST_CONTAINER_REPO_TAG=${GANTRY_TEST_CONTAINER_REPO_TAG}" | ||
bash shellspec --jobs 50 | ||
build_and_push: | ||
name: Build and push Docker image | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor != 'dependabot[bot]' }} | ||
needs: | ||
- shellcheck | ||
- tests | ||
- test_scripts | ||
- test_container | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
@@ -114,50 +139,3 @@ 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 | ||
if: ${{ github.actor != 'dependabot[bot]' }} | ||
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 |
---|---|---|
|
@@ -24,8 +24,8 @@ jobs: | |
shellcheck src/*.sh tests/*.sh | ||
set +e | ||
tests: | ||
name: Run tests | ||
test_scripts: | ||
name: Test scripts | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Docker Buildx | ||
|
@@ -42,16 +42,39 @@ jobs: | |
uses: actions/checkout@v4 | ||
- name: Run tests | ||
run: | | ||
export DOCKERHUB_PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }} | ||
export DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }} | ||
bash shellspec --jobs 50 | ||
test_container: | ||
name: Test container | ||
runs-on: ubuntu-latest | ||
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: Run container tests | ||
run: | | ||
export GANTRY_TEST_CONTAINER=true | ||
export GANTRY_TEST_CONTAINER_REPO_TAG= | ||
echo "GANTRY_TEST_CONTAINER=${GANTRY_TEST_CONTAINER}" | ||
echo "GANTRY_TEST_CONTAINER_REPO_TAG=${GANTRY_TEST_CONTAINER_REPO_TAG}" | ||
bash shellspec --jobs 50 | ||
build_and_push: | ||
name: Build and push Docker image | ||
runs-on: ubuntu-latest | ||
needs: | ||
- shellcheck | ||
- tests | ||
- test_scripts | ||
- test_container | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
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,2 +1,3 @@ | ||
.shellspec-quick.log | ||
coverage | ||
gantry-test-tmp |
Oops, something went wrong.