Skip to content

Commit

Permalink
ci: updated to latest kash
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbourianes-kalisio committed May 23, 2024
1 parent e7bce07 commit 4bfb918
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: ci
on: [ push, workflow_dispatch ]

jobs:
Expand All @@ -15,7 +15,7 @@ jobs:
run: bash ./scripts/init_runner.sh ${{ github.job }}
- name: Setup workspace
env:
GITHUB_DEVELOPMENT_PAT: ${{ secrets.GH_DEVELOPMENT_PAT }}
GITHUB_DEVELOPMENT_TOKEN: ${{ secrets.GH_DEVELOPMENT_TOKEN }}
run: bash ./scripts/setup_workspace.sh
- name: Run tests
env:
Expand All @@ -26,11 +26,8 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [ 16, 18, 20 ]
mongo: [ 4, 5, 6 ]
exclude:
- node: 16
mongo: 4
node: [ 18, 20 ]
mongo: [ 5, 6, 7 ]
name: Additional tests (node ${{ matrix.node }}, mongo ${{ matrix.mongo }})
if: ${{ contains(github.event.head_commit.message, 'additional tests') }}
runs-on: ubuntu-22.04
Expand All @@ -43,7 +40,7 @@ jobs:
run: bash ./scripts/init_runner.sh ${{ github.job }}
- name: Setup workspace
env:
GITHUB_DEVELOPMENT_PAT: ${{ secrets.GH_DEVELOPMENT_PAT }}
GITHUB_DEVELOPMENT_TOKEN: ${{ secrets.GH_DEVELOPMENT_TOKEN }}
run: bash ./scripts/setup_workspace.sh -n ${{ matrix.node }}
- name: Run tests
env:
Expand All @@ -63,7 +60,7 @@ jobs:
run: bash ./scripts/init_runner.sh ${{ github.job }}
- name: Setup workspace
env:
GITHUB_DEVELOPMENT_PAT: ${{ secrets.GH_DEVELOPMENT_PAT }}
GITHUB_DEVELOPMENT_TOKEN: ${{ secrets.GH_DEVELOPMENT_TOKEN }}
run: bash ./scripts/setup_workspace.sh
- name: Build app
env:
Expand All @@ -72,7 +69,7 @@ jobs:

build_docs:
name: Build docs
if: ${{ contains(github.event.head_commit.message, 'build doc') }}
if: ${{ startsWith(github.event.head_commit.message, 'docs:') || contains(github.event.head_commit.message, 'build doc') }}
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
Expand All @@ -83,7 +80,7 @@ jobs:
run: bash ./scripts/init_runner.sh ${{ github.job }}
- name: Setup workspace
env:
GITHUB_DEVELOPMENT_PAT: ${{ secrets.GH_DEVELOPMENT_PAT }}
GITHUB_DEVELOPMENT_TOKEN: ${{ secrets.GH_DEVELOPMENT_TOKEN }}
run: bash ./scripts/setup_workspace.sh
- name: Build docs
env:
Expand Down
3 changes: 1 addition & 2 deletions scripts/init_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ JOB_ID=$1

THIS_FILE=$(readlink -f "${BASH_SOURCE[0]}")
THIS_DIR=$(dirname "$THIS_FILE")
# ROOT_DIR=$(dirname "$THIS_DIR")

. "$THIS_DIR/kash/kash.sh"

Expand All @@ -17,7 +16,7 @@ init_github_run_tests() {
}

init_github_build_app() {
install_reqs age sops nvm node16
install_reqs age sops
}

init_github_build_docs() {
Expand Down
2 changes: 1 addition & 1 deletion scripts/kash
5 changes: 1 addition & 4 deletions scripts/setup_workspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@ ROOT_DIR=$(dirname "$THIS_DIR")
## Parse options
##

WORKSPACE_BRANCH=
WORKSPACE_TAG=

begin_group "Setting up workspace ..."

if [ "$CI" = true ]; then
WORKSPACE_DIR="$(dirname "$ROOT_DIR")"
DEVELOPMENT_REPO_URL="https://$GITHUB_DEVELOPMENT_PAT@github.com/kalisio/development.git"
DEVELOPMENT_REPO_URL="https://$GITHUB_DEVELOPMENT_TOKEN@github.com/kalisio/development.git"
else
while getopts "b:t" option; do
case $option in
Expand Down

0 comments on commit 4bfb918

Please sign in to comment.