Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit 6169155

Browse files
author
Joshua Thompson-Lindley
authored
Improve the CI/CD and Build Pipelines (#44)
* Makes the CI pipeline faster, we no longer do runtime analysis, we don't really need it. * Makes the CD pipeline run on the 1st of the month * CI only runs on PRs and pushes to master
2 parents 1c8a134 + 5363e88 commit 6169155

File tree

5 files changed

+9
-47
lines changed

5 files changed

+9
-47
lines changed

.github/workflows/build_release.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@v3
19-
- name: Initialize Runtime Code Analysis
20-
uses: github/codeql-action/init@v2
21-
with:
22-
languages: python
2319
- name: Setup Worker
2420
run: ci/scripts/setup_worker.sh
2521
- name: Increment Version Number
@@ -28,14 +24,6 @@ jobs:
2824
run: ci/scripts/build.sh
2925
- name: Perform Static Code Analysis
3026
run: ci/scripts/codescan.sh
31-
- name: Perform Runtime Code Analysis
32-
uses: github/codeql-action/analyze@v2
33-
- name: Perform Secure Code Analysis (Secrets)
34-
uses: trufflesecurity/trufflehog@main
35-
with:
36-
path: ./
37-
base: ${{ github.ref_name }}
38-
head: HEAD
3927
- name: Run Unit Tests
4028
run: ci/scripts/test_runner.sh
4129
- name: Upload release to PyPI

.github/workflows/cd.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Continuous Deployment
22
on:
33
schedule:
4-
- cron: "00 09 * * 1"
4+
- cron: "00 09 1 * *"
55
jobs:
66
pre_release_check:
77
name: Pre-release Check
@@ -30,26 +30,14 @@ jobs:
3030
runs-on: ubuntu-latest
3131
steps:
3232
- uses: actions/checkout@v3
33-
- name: Initialize Runtime Code Analysis
34-
uses: github/codeql-action/init@v2
35-
with:
36-
languages: python
3733
- name: Setup Worker
3834
run: ci/scripts/setup_worker.sh
3935
- name: Increment Version Number
40-
run: ci/scripts/new_version.sh --auto_increment
36+
run: ci/scripts/new_version.sh auto_increment
4137
- name: Build Package and Verify
4238
run: ci/scripts/build.sh
4339
- name: Perform Static Code Analysis
4440
run: ci/scripts/codescan.sh
45-
- name: Perform Runtime Code Analysis
46-
uses: github/codeql-action/analyze@v2
47-
- name: Perform Secure Code Analysis (Secrets)
48-
uses: trufflesecurity/trufflehog@main
49-
with:
50-
path: ./
51-
base: ${{ github.ref_name }}
52-
head: HEAD
5341
- name: Run Unit Tests
5442
run: ci/scripts/test_runner.sh
5543
- name: Upload release to PyPI

.github/workflows/ci.yml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,25 @@
11
name: Continuous Integration
22
on:
3+
pull_request:
4+
branches:
5+
- master
36
push:
7+
branches:
8+
- master
49
schedule:
510
- cron: "00 09 * * *"
611
jobs:
712
continuous_integration:
813
name: Continuous Integration
9-
permissions:
10-
actions: read
11-
contents: read
12-
security-events: write
1314
runs-on: ubuntu-latest
1415
steps:
1516
- uses: actions/checkout@v3
16-
- name: Initialize Runtime Code Analysis
17-
uses: github/codeql-action/init@v2
18-
with:
19-
languages: python
2017
- name: Setup Worker
2118
run: ci/scripts/setup_worker.sh
2219
- name: Build Package and Verify
2320
run: ci/scripts/build.sh
2421
- name: Perform Static Code Analysis
2522
run: ci/scripts/codescan.sh
26-
- name: Perform Runtime Code Analysis
27-
uses: github/codeql-action/analyze@v2
28-
- name: Perform Secure Code Analysis (Secrets)
29-
uses: trufflesecurity/trufflehog@main
30-
with:
31-
path: ./
32-
base: ${{ github.ref_name }}
33-
head: HEAD
3423
- name: Run Unit Tests
3524
run: ci/scripts/test_runner.sh
3625
- name: Upload Test Report

ci/scripts/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ REPO=$(dirname "$REPO../")
88
REPO=$(dirname "$REPO../")
99

1010
cd $REPO
11-
sudo python3 -m build
12-
sudo python3 -m twine check $REPO/dist/*
11+
python3 -m build
12+
python3 -m twine check $REPO/dist/*

ci/scripts/setup_worker.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,3 @@ REPO=$(dirname "$REPO../")
1010
python3 -m pip install --upgrade pip
1111
python3 -m pip install -r $REPO/ci/config/requirements.txt
1212
python3 -m pip install -r $REPO/requirements.txt
13-
sudo python3 -m pip install --upgrade pip
14-
sudo python3 -m pip install -r $REPO/ci/config/requirements.txt
15-
sudo python3 -m pip install -r $REPO/requirements.txt

0 commit comments

Comments
 (0)