-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to the latest version of scaffold and added code coverage.
- Loading branch information
1 parent
079336e
commit 81ecfb0
Showing
15 changed files
with
240 additions
and
568 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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
version: 2 | ||
version: 2.1 | ||
|
||
orbs: | ||
codecov: codecov/[email protected] | ||
|
||
jobs: | ||
build: | ||
docker: | ||
|
@@ -11,7 +15,9 @@ jobs: | |
- checkout | ||
- run: | ||
name: Lint scripts | ||
command: shellcheck seed-db.sh | ||
command: | | ||
shfmt -i 2 -ci -s -d seed-db.sh tests/bats/*.bash tests/bats/*.bats | ||
shellcheck seed-db.sh tests/bats/*.bash tests/bats/*.bats | ||
- setup_remote_docker | ||
- run: | ||
name: Create Docker builder and install emulators | ||
|
@@ -26,17 +32,23 @@ jobs: | |
- run: | ||
name: Run Bats tests | ||
command: | | ||
npm --prefix tests/bats ci | ||
echo "${DOCKER_PASS}" | docker login --username "${DOCKER_USER}" --password-stdin | ||
bats tests/bats/data.bats --tap | ||
kcov --include-pattern=.sh,.bash --bash-parse-files-in-dir=. --exclude-pattern=vendor,node_modules,coverage $(pwd)/coverage tests/bats/node_modules/.bin/bats tests/bats | ||
- store_artifacts: | ||
path: coverage | ||
- codecov/upload: | ||
# @see https://github.com/codecov/codecov-circleci-orb/issues/158 | ||
xtra_args: "--nonZero -s coverage" | ||
- run: | ||
name: Deploy image | ||
command: | | ||
echo "${DOCKER_PASS}" | docker login --username "${DOCKER_USER}" --password-stdin | ||
echo "${DOCKER_PASS}" | docker login --username "${DOCKER_USER}" --password-stdin | ||
if [ -n "${CIRCLE_TAG}" ]; then | ||
export TAG="${CIRCLE_TAG}" | ||
elif [ "${CIRCLE_BRANCH}" != "main" ]; then | ||
export TAG="$(echo ${CIRCLE_BRANCH} | sed 's/[^a-zA-Z0-9]/-/g')" | ||
fi | ||
fi | ||
DOCKER_BUILDKIT=1 docker buildx build --no-cache --platform "${BUILDX_PLATFORMS}" --tag drevops/mariadb-drupal-data:${TAG:-canary} --push . | ||
workflows: | ||
|
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,25 @@ | ||
# This is the top-most .editorconfig file; do not search in parent directories. | ||
root = true | ||
|
||
# All files. | ||
[*] | ||
end_of_line = LF | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
|
||
|
||
[*.{json,lock}] | ||
indent_size = 4 | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 | ||
|
||
[*.{sh,bash,bats}] | ||
indent_size = 2 | ||
|
||
[*.xml] | ||
indent_size = 4 |
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 was deleted.
Oops, something went wrong.
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,22 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release-drafter: | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,6 @@ | ||
# To ignore OS temporary files use global .gitignore | ||
# https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files#configuring-ignored-files-for-all-repositories-on-your-computer | ||
|
||
.data | ||
.logs | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/node_modules | ||
/coverage |
Oops, something went wrong.