Skip to content

Commit eab0118

Browse files
Merge pull request #154 from RecursionSpace/dev-release
Dev release
2 parents 75c8e41 + a24ed42 commit eab0118

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1218
-2066
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
version: 2
44
updates:
5-
65
- package-ecosystem: "github-actions"
76
directory: "/"
87
schedule:
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Continious Deployment - Production
1+
# Continuous Deployment - Production
22

33
name: Release - Version & Deploy
44
on:
5-
push:
6-
branches: [ release ]
5+
release:
6+
types: [published]
77

88
workflow_dispatch:
99

@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
- name: Release Webhook
17-
uses: distributhor/workflow-webhook@v1
17+
uses: distributhor/workflow-webhook@v3
1818
env:
1919
webhook_url: "https://recursion.space/webhooks/github/"
2020
webhook_secret: "Y0uR5ecr3t"
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: CD | Dev Release
2+
3+
# Performs the task of merging from master to the dev-release branch.
4+
# Pings the server to pull an update once the dev-release branch has been merged.
5+
6+
on:
7+
push:
8+
branches: [master]
9+
10+
workflow_dispatch:
11+
12+
jobs:
13+
14+
merge:
15+
name: master -> master-ci
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Wait on check
22+
uses: fountainhead/[email protected]
23+
id: wait-for-build
24+
25+
with:
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
checkName: build
28+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
29+
30+
- name: Create Pull Request
31+
32+
if: steps.wait-for-build.outputs.conclusion == 'success'
33+
uses: repo-sync/pull-request@v2
34+
with:
35+
destination_branch: "master-ci"
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Merge master -> master-ci
39+
40+
if: steps.wait-for-build.outputs.conclusion == 'success'
41+
uses: devmasx/[email protected]
42+
with:
43+
type: now
44+
target_branch: master-ci
45+
github_token: ${{ secrets.GITHUB_TOKEN }}
46+
47+
48+
49+
# master-ci -> dev-release
50+
sanitize:
51+
name: master-ci -> dev-release
52+
runs-on: ubuntu-latest
53+
54+
steps:
55+
- name: Checkout master-ci
56+
uses: actions/checkout@v3
57+
with:
58+
ref: master-ci
59+
fetch-depth: 0
60+
61+
- name: Wait on Merge
62+
uses: fountainhead/[email protected]
63+
id: wait-for-merge
64+
with:
65+
token: ${{ secrets.GITHUB_TOKEN }}
66+
checkName: master -> master-ci
67+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
68+
69+
- name: Checkout dev-release
70+
uses: actions/checkout@v3
71+
with:
72+
ref: dev-release
73+
fetch-depth: 0
74+
75+
- name: Remove Bloat
76+
id: remove-bloat
77+
if: steps.wait-for-merge.outputs.conclusion == 'success'
78+
run: |
79+
git config user.name github-actions
80+
git config user.email [email protected]
81+
82+
git checkout dev-release
83+
git pull origin dev-release
84+
85+
git merge origin/master-ci
86+
87+
rm -rf LICENSE
88+
rm -rf README.md
89+
rm -rf docs
90+
rm -rf tests
91+
92+
git add .
93+
94+
git diff-index --quiet HEAD || git commit -m "Merge master-ci into dev-release and remove unnecessary files"
95+
96+
git push origin dev-release
97+
98+
- name: Webhook
99+
uses: distributhor/workflow-webhook@v3
100+
env:
101+
webhook_url: "https://dev.recursion.space/webhooks/github/"
102+
webhook_secret: "Y0uR5ecr3t"

.github/workflows/CI_E2E.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI | E2E Integration
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
- '!master-ci'
8+
- '!release'
9+
10+
pull_request:
11+
branches:
12+
- master
13+
14+
workflow_dispatch:
15+
16+
jobs:
17+
setup:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v3
22+
23+
- uses: webfactory/[email protected]
24+
with:
25+
ssh-private-key: ${{ secrets.RECURSION_SPACE_ACCESS_TOKEN}}
26+
27+
- name: Setup Server
28+
run: |
29+
sudo apt-get update -y && sudo apt-get upgrade -y
30+
sudo apt install software-properties-common -y
31+
sudo add-apt-repository ppa:deadsnakes/ppa
32+
sudo apt install python3.11 -y
33+
cd /opt/
34+
35+
git clone --single-branch --branch release [email protected]:RecursionSpace/RecursionSpace.git
36+
37+
sudo apt-get install python3.11-venv -y
38+
sudo python3.11 -m venv /opt/RecursionSpace/env
39+
source /opt/RecursionSpace/env/bin/activate
40+
41+
/opt/RecursionSpace/env/bin/python3.11 -m pip install --upgrade pip
42+
43+
sudo pip install --no-input -U -r /opt/RecursionSpace/requirements.txt --no-cache-dir
44+
45+
cd /opt/RecursionSpace/
46+
sudo python manage.py migrate --noinput
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Code Quality
1+
name: CI | Pylint
22

33
on: [push]
44

@@ -8,11 +8,11 @@ jobs:
88
runs-on: ubuntu-latest
99

1010
steps:
11-
- uses: actions/checkout@v2
12-
- name: Set up Python 3.8
13-
uses: actions/setup-python@v1
11+
- uses: actions/checkout@v3
12+
- name: Set up Python 3.11
13+
uses: actions/setup-python@v4.5.0
1414
with:
15-
python-version: 3.8
15+
python-version: 3.11
1616

1717
- name: Install dependencies
1818
run: |
@@ -21,9 +21,8 @@ jobs:
2121
pip install pylint-exit
2222
if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi
2323
24-
- name: Analysing the code with pylint
24+
- name: Analyzing the code with Pylint
2525
run: |
26-
pylint `ls -r|grep .py$|xargs` --disable=import-error,E1101 || pylint-exit --error-fail --warn-fail --convention-fail $?
2726
pylint openpod `ls -r|grep .py$|xargs` --disable=import-error,E1101 || pylint-exit --error-fail --warn-fail --convention-fail $?
2827
2928
pylint tests `ls -r|grep .py$|xargs` --disable=import-error,E1101,R0801 || pylint-exit --error-fail --warn-fail --convention-fail $?
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
1-
name: Script Check
1+
name: CI | Script Check
22

33
on:
44
push:
5+
branches:
6+
- '**'
7+
- 'master'
8+
- '!master-ci'
9+
- '!release'
10+
11+
pull_request:
512
branches:
613
- master
7-
- main
814

915
workflow_dispatch:
1016

17+
1118
jobs:
1219
lint:
1320
runs-on: ubuntu-latest
1421

1522
steps:
16-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v3
1724

1825
- name: Run Shellcheck
1926
uses: azohra/shell-linter@latest
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CI | Installer
2+
3+
on: [push]
4+
5+
jobs:
6+
install:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v3
12+
13+
- name: Run Installer
14+
run: |
15+
sudo chmod +x installer.sh
16+
sudo ./installer.sh

.github/workflows/RecursionTests.yml renamed to .github/workflows/CI_Tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will install Python dependencies, run tests and lint with a single version of Python
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: Recursion.Space Tests
4+
name: CI | Build & Test
55
on:
66
push:
77
branches: [ master ]
@@ -14,11 +14,11 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v2
18-
- name: Set up Python 3.9
19-
uses: actions/setup-python@v2
17+
- uses: actions/checkout@v3
18+
- name: Set up Python 3.11
19+
uses: actions/setup-python@v4.5.0
2020
with:
21-
python-version: 3.9
21+
python-version: 3.11
2222
- name: Install dependencies
2323
run: |
2424
python -m pip install --upgrade pip
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI | Verify Bash Installer
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
- 'master'
8+
- '!master-ci'
9+
- '!release'
10+
11+
pull_request:
12+
branches:
13+
- master
14+
15+
workflow_dispatch:
16+
17+
18+
jobs:
19+
install:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v3
24+
25+
- name: Run Bash Installer
26+
run: |
27+
sudo /bin/bash installer.sh
28+
sudo systemd-analyze verify openpod.service
29+
30+
# - name: Validate JSON
31+
# uses: limitusus/json-syntax-check@v1
32+
# env:
33+
# BASE: '/opt/OpenPod'
34+
# with:
35+
# pattern: "\\.json$"

.github/workflows/TestInstaller.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)