Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/cfgv-3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
calebtonn authored Sep 25, 2023
2 parents 84b412e + 1357c12 commit 34465c0
Show file tree
Hide file tree
Showing 31 changed files with 599 additions and 411 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
# These jobs are specifically designed to test the codebase
# and ensure that basic contributing from both mac and windows will work

name: Build & Test

on:
push:
branches-ignore: [ main ]
workflow_call:


jobs:
build-windows:
name: Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.9
id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.9"

- name: Set Up Project
run: |
pip install poetry
poetry install
- name: Run Tests
run: |
poetry run poe precommit
# Both of these lines error when run on a windows image, more research required as to why
# poetry run poe coverage
# poetry run secureli build


build-linux:
name: Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Validate Branch name
run: ./scripts/get-current-branch.sh

- name: Set up Python 3.9
id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.9"

- name: Set Up Project
run: |
pip install poetry
poetry install
- name: Run Tests
run: |
poetry run poe precommit
poetry run poe coverage
poetry run secureli build
secureli-release-noop:
name: Release Test
needs: [ build-linux, build-windows ]
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
concurrency: release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Python Semantic Release
uses: relekang/python-semantic-release@master
with:
root_options: -vv --noop
65 changes: 0 additions & 65 deletions .github/workflows/integration-testing.yml

This file was deleted.

73 changes: 73 additions & 0 deletions .github/workflows/integration_testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Integration Testing

on:
workflow_call:
workflow_dispatch:

jobs:
test-windows:
runs-on: windows-latest
steps:
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install seCureLI
run: |
pip3 --version #any pip havers?
pip3 install secureli
git clone https://github.com/pypa/pip pip
cd pip
secureli init --yes
secureli scan --mode all-files --yes
test-homebrew-osx:
runs-on: macos-latest
steps:
- name: Test with Homebrew
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

- name: Prep for python 3.11.3 install # Removes python 3.11.3 to avoid conflict with homebrew python
run: |
rm -rf '/usr/local/bin/2to3'
rm -rf '/usr/local/bin/2to3-3.11'
rm -rf '/usr/local/bin/idle3'
rm -rf '/usr/local/bin/idle3.11'
rm -rf '/usr/local/bin/pydoc3'
rm -rf '/usr/local/bin/pydoc3.11'
rm -rf '/usr/local/bin/python3'
rm -rf '/usr/local/bin/python3-config'
rm -rf '/usr/local/bin/python3.11'
rm -rf '/usr/local/bin/python3.11-config'
- name: Set up seCureLI
run: |
brew tap slalombuild/secureli
HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install secureli
- name: Checkout test repo
uses: actions/checkout@v4
with:
repository: pypa/pip
path: pip

- name: Init seCureLI
run: cd pip && secureli init --yes && secureli scan


test-pypi-osx:
runs-on: macos-latest
steps:
- name: Test with Pypi
run: |
pip3 --version #what do we have on the macos image
pip3 install secureli
git clone https://github.com/pypa/pip pip
cd pip
secureli init --yes
secureli scan --mode all-files --yes
17 changes: 10 additions & 7 deletions .github/workflows/pr_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ name: PR Title Lint

on:
pull_request:
branches: [main]
types: [opened, edited, reopened, synchronize]
branches: [ main ]
types:
- opened
- edited
- reopened

jobs:
check_pr_title:
runs-on: ubuntu-latest
steps:
- uses: morrisoncole/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
title-regex: "(chore|style|test|feat|fix|docs): .+"
on-failed-regex-fail-action: true
- uses: morrisoncole/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
title-regex: "(chore|style|test|feat|fix|docs): .+"
on-failed-regex-fail-action: true
Loading

0 comments on commit 34465c0

Please sign in to comment.