Skip to content

Commit

Permalink
change shell to backend
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijeetSaroha committed Sep 23, 2024
1 parent af80420 commit 483e37c
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

defaults:
run:
shell: bash -l {0}
backend: bash -l {0}

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

defaults:
run:
shell: bash -l {0}
backend: bash -l {0}

concurrency:
group: ci-tests-${{ matrix.os }}-${{ matrix.python_version }}-${{ github.ref }}
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:

defaults:
run:
shell: bash -l {0}
backend: bash -l {0}

concurrency:
group: ci-linter-docs-${{ matrix.os }}-${{ matrix.python_version }}-${{ github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

defaults:
run:
shell: bash -l {0}
backend: bash -l {0}

steps:
- uses: actions/checkout@v4
Expand Down
28 changes: 14 additions & 14 deletions .makim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ groups:
tasks:
tmp:
help: Clean unnecessary temporary files
shell: bash
backend: bash
run: |
rm -fr build/
rm -fr dist/
Expand Down Expand Up @@ -103,7 +103,7 @@ groups:
action: store_true
env:
MAKIM_FILE: ./tests/smoke/.makim-simple.yaml
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
makim $VERBOSE_FLAG --file $MAKIM_FILE --help
Expand All @@ -120,7 +120,7 @@ groups:
help: Run the all the tests in verbose mode
type: bool
action: store_true
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
makim $VERBOSE_FLAG --file $MAKIM_FILE --help
Expand Down Expand Up @@ -165,7 +165,7 @@ groups:
help: Run the all the tests in verbose mode
type: bool
action: store_true
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
cd ./tests/smoke
Expand All @@ -182,7 +182,7 @@ groups:
action: store_true
env:
MAKIM_FILE: tests/smoke/.makim-interpreters.yaml
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
export MAKIM_FILE="$(pwd)/${MAKIM_FILE}"
Expand All @@ -197,7 +197,7 @@ groups:
action: store_true
env:
MAKIM_FILE: ./tests/smoke/.makim-unittest.yaml
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
makim $VERBOSE_FLAG --file $MAKIM_FILE --help
Expand All @@ -220,7 +220,7 @@ groups:
action: store_true
env:
MAKIM_FILE: ./tests/smoke/.makim-env.yaml
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
makim $VERBOSE_FLAG --file $MAKIM_FILE --help
Expand All @@ -244,14 +244,14 @@ groups:
action: store_true
env:
MAKIM_FILE: ./tests/smoke/.makim-vars.yaml
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
makim $VERBOSE_FLAG --file $MAKIM_FILE vars-group.vars-task
bash:
help: Test makim shell attribute with bash
shell: bash
backend: bash
args:
verbose-mode:
help: Run the all the tests in verbose mode
Expand All @@ -274,7 +274,7 @@ groups:
action: store_true
env:
MAKIM_FILE: tests/smoke/.makim-dir-absolute-path.yaml
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
makim $VERBOSE_FLAG --file $MAKIM_FILE --help
Expand All @@ -300,7 +300,7 @@ groups:
action: store_true
env:
MAKIM_FILE: tests/smoke/.makim-dir-no-path.yaml
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
export MAKIM_FILE="$(pwd)/${MAKIM_FILE}"
Expand Down Expand Up @@ -328,7 +328,7 @@ groups:
action: store_true
env:
MAKIM_FILE: tests/smoke/.makim-dir-relative-path.yaml
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
export MAKIM_FILE="$(pwd)/${MAKIM_FILE}"
Expand All @@ -351,9 +351,9 @@ groups:
tasks:
python-assert:
help: Raise an system error
shell: python
backend: python
run: assert False, "Failed"
code-3:
help: Raise an system error
shell: bash
backend: bash
run: exit 3
4 changes: 2 additions & 2 deletions docs/tutorials/makim-for-nox-users/.makim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ groups:
tasks:
tests:
help: Run nox tests
shell: nox
backend: nox
run: |
import nox
Expand All @@ -16,7 +16,7 @@ groups:
session.run("pytest", "--version")
lint:
help: Run nox tests
shell: nox
backend: nox
run: |
import nox
Expand Down
2 changes: 1 addition & 1 deletion src/makim/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def _extract_shell_app_config(
self, scoped_config: dict[str, Any]
) -> AppConfigType:
"""Extract the shell app configuration from the scoped config data."""
shell_app_data: AppConfigType = scoped_config.get('shell', {})
shell_app_data: AppConfigType = scoped_config.get('backend', {})

if not shell_app_data:
return {}
Expand Down
2 changes: 1 addition & 1 deletion tests/smoke/.makim-bash-group-scope.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 1.0
env-file: .env
groups:
group-scope:
shell: bash
backend: bash
tasks:
test:
help: Test bash defined in the group scope
Expand Down
2 changes: 1 addition & 1 deletion tests/smoke/.makim-bash-main-scope.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 1.0
env-file: .env
shell: bash
backend: bash
groups:
main-scope:
tasks:
Expand Down
2 changes: 1 addition & 1 deletion tests/smoke/.makim-bash-task-scope.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ groups:
print(os.getcwd())
test:
shell: bash
backend: bash
help: Test bash defined in the task scope
dependencies:
- task: task-scope.dep
Expand Down
14 changes: 7 additions & 7 deletions tests/smoke/.makim-interpreters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ groups:
tasks:
node:
help: Test using nodejs
shell: node
backend: node
run: console.log("Hello, World!");

nox:
help: Test using nox
shell:
backend:
app: nox
args: ["--noxfile"]
suffix: .nox.py
Expand All @@ -24,27 +24,27 @@ groups:
perl:
help: Test using perl
shell: perl
backend: perl
run: print "Hello, World!\n";

php:
help: Test using php
shell: php
backend: php
run: print "Hello, World!\n";

python:
help: Test using php
shell: python
backend: python
run: print("Hello, World!")

r:
help: Test using R
shell: Rscript
backend: Rscript
run: print("Hello World!")

sh:
help: Test using sh
shell: sh
backend: sh
run: echo "Hello, World!"

all:
Expand Down
2 changes: 1 addition & 1 deletion tests/smoke/.makim-sugar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ groups:
help: test running a docker service using containers-sugar
dependencies:
- task: containers.setup
shell: bash
backend: bash
run: |
sugar exec --service service1 --options -T --cmd python -c "print(1)"
sugar stop --all
4 changes: 2 additions & 2 deletions tests/smoke/.makim-unittest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ groups:

test-8:
help: failure test in 1 line
shell: bash
backend: bash
run: "false"

test-9:
help: failure test in the first line of 2 lines
shell: bash
backend: bash
run: |
false
true

0 comments on commit 483e37c

Please sign in to comment.