-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (52 loc) · 1.86 KB
/
pull_request_to_dev.yml
File metadata and controls
66 lines (52 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Open Pull Request to Dev
run-name: Pull request "${{ github.head_ref }}" to dev by ${{ github.actor }}
on:
workflow_call:
inputs:
image_to_use:
required: true
type: string
jobs:
Pull_request_checks:
runs-on: ubuntu-latest
container:
image: ${{ inputs.image_to_use }}
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Show Computing Environment
id: Show_Computing_Environment
run: |
# Activating bash
bash
echo "Checking in ${{ inputs.image_to_use }}"
. /root/miniconda3/etc/profile.d/conda.sh && conda init bash
conda activate SCSAWorkflow_NIDAP
conda list
- run: echo "Checking in ${{ inputs.image_to_use }}"
- uses: actions/checkout@v3
with:
token: ${{secrets.GITHUB_TOKEN}}
- name: Lint All Python Scripts
id: lint_all
run: |
export current_wd="/__w/${GITHUB_REPOSITORY#*/}/${GITHUB_REPOSITORY#*/}"
echo "$current_wd"
# python -m pip install flake8
# echo "flake8 version:"
flake8 --version
echo "Setup git:"
git config --global --add safe.directory $current_wd
git clone https://github.com/fnlcr-dmap/gitflow-py.git
cd $current_wd
bash $current_wd/gitflow-py/src/lint_all_scripts.sh
- id: Run_All_Unit_Tests
name: Run All Unit Tests
run: |
bash
. /root/miniconda3/etc/profile.d/conda.sh && conda init bash
conda activate SCSAWorkflow_NIDAP
export current_wd="/__w/${GITHUB_REPOSITORY#*/}/${GITHUB_REPOSITORY#*/}"
echo "$current_wd"
bash $current_wd/gitflow-py/src/run_all_unit_tests.sh "$current_wd"