Skip to content

Commit

Permalink
Merge pull request #154 from RecursionSpace/dev-release
Browse files Browse the repository at this point in the history
Dev release
  • Loading branch information
justinmerrell authored Jan 25, 2023
2 parents 75c8e41 + a24ed42 commit eab0118
Show file tree
Hide file tree
Showing 43 changed files with 1,218 additions and 2,066 deletions.
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Continious Deployment - Production
# Continuous Deployment - Production

name: Release - Version & Deploy
on:
push:
branches: [ release ]
release:
types: [published]

workflow_dispatch:

Expand All @@ -14,7 +14,7 @@ jobs:

steps:
- name: Release Webhook
uses: distributhor/workflow-webhook@v1
uses: distributhor/workflow-webhook@v3
env:
webhook_url: "https://recursion.space/webhooks/github/"
webhook_secret: "Y0uR5ecr3t"
102 changes: 102 additions & 0 deletions .github/workflows/CD_dev-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: CD | Dev Release

# Performs the task of merging from master to the dev-release branch.
# Pings the server to pull an update once the dev-release branch has been merged.

on:
push:
branches: [master]

workflow_dispatch:

jobs:

merge:
name: master -> master-ci
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Wait on check
uses: fountainhead/[email protected]
id: wait-for-build

with:
token: ${{ secrets.GITHUB_TOKEN }}
checkName: build
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Create Pull Request

if: steps.wait-for-build.outputs.conclusion == 'success'
uses: repo-sync/pull-request@v2
with:
destination_branch: "master-ci"
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Merge master -> master-ci

if: steps.wait-for-build.outputs.conclusion == 'success'
uses: devmasx/[email protected]
with:
type: now
target_branch: master-ci
github_token: ${{ secrets.GITHUB_TOKEN }}



# master-ci -> dev-release
sanitize:
name: master-ci -> dev-release
runs-on: ubuntu-latest

steps:
- name: Checkout master-ci
uses: actions/checkout@v3
with:
ref: master-ci
fetch-depth: 0

- name: Wait on Merge
uses: fountainhead/[email protected]
id: wait-for-merge
with:
token: ${{ secrets.GITHUB_TOKEN }}
checkName: master -> master-ci
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Checkout dev-release
uses: actions/checkout@v3
with:
ref: dev-release
fetch-depth: 0

- name: Remove Bloat
id: remove-bloat
if: steps.wait-for-merge.outputs.conclusion == 'success'
run: |
git config user.name github-actions
git config user.email [email protected]
git checkout dev-release
git pull origin dev-release
git merge origin/master-ci
rm -rf LICENSE
rm -rf README.md
rm -rf docs
rm -rf tests
git add .
git diff-index --quiet HEAD || git commit -m "Merge master-ci into dev-release and remove unnecessary files"
git push origin dev-release
- name: Webhook
uses: distributhor/workflow-webhook@v3
env:
webhook_url: "https://dev.recursion.space/webhooks/github/"
webhook_secret: "Y0uR5ecr3t"
46 changes: 46 additions & 0 deletions .github/workflows/CI_E2E.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI | E2E Integration

on:
push:
branches:
- '**'
- '!master-ci'
- '!release'

pull_request:
branches:
- master

workflow_dispatch:

jobs:
setup:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.RECURSION_SPACE_ACCESS_TOKEN}}

- name: Setup Server
run: |
sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.11 -y
cd /opt/
git clone --single-branch --branch release [email protected]:RecursionSpace/RecursionSpace.git
sudo apt-get install python3.11-venv -y
sudo python3.11 -m venv /opt/RecursionSpace/env
source /opt/RecursionSpace/env/bin/activate
/opt/RecursionSpace/env/bin/python3.11 -m pip install --upgrade pip
sudo pip install --no-input -U -r /opt/RecursionSpace/requirements.txt --no-cache-dir
cd /opt/RecursionSpace/
sudo python manage.py migrate --noinput
13 changes: 6 additions & 7 deletions .github/workflows/pylint.yml → .github/workflows/CI_Pylint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Code Quality
name: CI | Pylint

on: [push]

Expand All @@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4.5.0
with:
python-version: 3.8
python-version: 3.11

- name: Install dependencies
run: |
Expand All @@ -21,9 +21,8 @@ jobs:
pip install pylint-exit
if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi
- name: Analysing the code with pylint
- name: Analyzing the code with Pylint
run: |
pylint `ls -r|grep .py$|xargs` --disable=import-error,E1101 || pylint-exit --error-fail --warn-fail --convention-fail $?
pylint openpod `ls -r|grep .py$|xargs` --disable=import-error,E1101 || pylint-exit --error-fail --warn-fail --convention-fail $?
pylint tests `ls -r|grep .py$|xargs` --disable=import-error,E1101,R0801 || pylint-exit --error-fail --warn-fail --convention-fail $?
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
name: Script Check
name: CI | Script Check

on:
push:
branches:
- '**'
- 'master'
- '!master-ci'
- '!release'

pull_request:
branches:
- master
- main

workflow_dispatch:


jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Run Shellcheck
uses: azohra/shell-linter@latest
16 changes: 16 additions & 0 deletions .github/workflows/CI_TestInstaller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CI | Installer

on: [push]

jobs:
install:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Run Installer
run: |
sudo chmod +x installer.sh
sudo ./installer.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Recursion.Space Tests
name: CI | Build & Test
on:
push:
branches: [ master ]
Expand All @@ -14,11 +14,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4.5.0
with:
python-version: 3.9
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/CI_VerifyInstaller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI | Verify Bash Installer

on:
push:
branches:
- '**'
- 'master'
- '!master-ci'
- '!release'

pull_request:
branches:
- master

workflow_dispatch:


jobs:
install:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Run Bash Installer
run: |
sudo /bin/bash installer.sh
sudo systemd-analyze verify openpod.service
# - name: Validate JSON
# uses: limitusus/json-syntax-check@v1
# env:
# BASE: '/opt/OpenPod'
# with:
# pattern: "\\.json$"
24 changes: 0 additions & 24 deletions .github/workflows/TestInstaller.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -53,7 +53,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -67,4 +67,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
Loading

0 comments on commit eab0118

Please sign in to comment.