Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My first cli PR #3

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 39 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ develop ]
paths-ignore:
- '.github/**'
pull_request:
branches: [ develop ]
paths-ignore:
- '.github/**'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -18,19 +22,44 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: test-anl
runs-on: self-hosted

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!

# Runs a set of commands using the runners shell
- name: Run a multi-line script
with:
submodules: 'true'

- name: Check latest commit on submodule project
run: |
cd $GITHUB_WORKSPACE/submodule1
git log -1

- name: Running test-common build
run: |
cd $GITHUB_WORKSPACE
echo "starting the build"
./build.sh
echo "build completed successfully"

- name: Running tests on backend1
run: |
echo Add other actions to build,
echo test, and deploy your project.
echo "starting test execution on backend1"
cd $GITHUB_WORKSPACE
./test.sh
echo "test execution completed"

- name: Running tests on backend2
run: |
echo "starting test execution on backend2"
cd $GITHUB_WORKSPACE
./test.sh
echo "test execution completed on backend2"

- name: Clean temp directory
run: |
cd $GITHUB_WORKSPACE
rm -rf *
echo "cleaned up the workspace"

8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@
path = submodule1
url = https://github.com/arjun-raj-kuppala/repo2.git
branch = develop
[submodule "backend2"]
path = backend2
url = https://github.com/arjun-raj-kuppala/test-backend2.git
branch = develop
[submodule "backend1"]
path = backend1
url = https://github.com/arjun-raj-kuppala/test-backend1.git
branch = develop
1 change: 1 addition & 0 deletions backend1
Submodule backend1 added at 4b9730
1 change: 1 addition & 0 deletions backend2
Submodule backend2 added at 4b9730
2 changes: 2 additions & 0 deletions build.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /bin/bash

echo "This is a repo 1 project which is getting built"
echo "Adding one more step"
echo "adding second step"
1 change: 0 additions & 1 deletion submodule1
Submodule submodule1 deleted from 06e1e6
2 changes: 2 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "executing tests..."
sleep 5