Skip to content

Commit

Permalink
Justinwerner/sc 87/setup GitHub actions (#57)
Browse files Browse the repository at this point in the history
* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Work in progress. Needs further testing.

* Initial CI/CD done.
  • Loading branch information
justinwerner authored Feb 3, 2024
1 parent 62d4a1f commit 590e49d
Show file tree
Hide file tree
Showing 6 changed files with 162 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .env.ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
APP_KEY=base64:DW6qtQ3/eLXLK9xk7rMlm/2cglk9sJqXz79V/zz8VQk=
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=test
DB_USERNAME=root
DB_PASSWORD=password
50 changes: 50 additions & 0 deletions .github/workflows/ci-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
on:
push:
branches:
- main
name: CI Staging
jobs:
test:
runs-on: ubuntu-latest
container:
image: kirschbaumdevelopment/laravel-test-runner:8.3

services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- uses: actions/checkout@v3

- name: Get nova setup for installation
run: |
composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_PASSWORD }}"
- name: Install composer dependencies
run: |
composer install --no-scripts
- name: Install front-end dependencies
run: |
npm install
npm run build
- name: Prepare Venture
run: |
cp .env.ci .env.testing
- name: Run Testsuite
run: vendor/bin/pest

deploy:
runs-on: ubuntu-latest

steps:
- name: Deploy to Laravel Forge
run: curl ${{ secrets.FORGE_PRODUCTION_DEPLOYMENT_WEBHOOK }}
50 changes: 50 additions & 0 deletions .github/workflows/ci-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
on:
push:
branches:
- staging
name: CI Staging
jobs:
test:
runs-on: ubuntu-latest
container:
image: kirschbaumdevelopment/laravel-test-runner:8.3

services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- uses: actions/checkout@v3

- name: Get nova setup for installation
run: |
composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_PASSWORD }}"
- name: Install composer dependencies
run: |
composer install --no-scripts
- name: Install front-end dependencies
run: |
npm install
npm run build
- name: Prepare Venture
run: |
cp .env.ci .env.testing
- name: Run Testsuite
run: vendor/bin/pest

deploy:
runs-on: ubuntu-latest

steps:
- name: Deploy to Laravel Forge
run: curl ${{ secrets.FORGE_STAGING_DEPLOYMENT_WEBHOOK }}
26 changes: 26 additions & 0 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Create Release

on:
push:
tags:
- 'v.*'

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body_path: CHANGELOG.md
draft: false
prerelease: false
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Changelog

## [Unreleased]

## [1.1.0-beta] - 2024-01-03

### Added

- Implementation of Opt-In Page, Legal Pages, and Signed Unsubscribe Link (#12)
- Student Account Creation Process Revamped (#13)

### Fixed

- N/A

### Changed

- N/A

### Removed

- N/A
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,10 @@ Venture is a student-led initiative. We welcome contributions from the community
### Support

For support, queries, or feedback, please contact us at support@learnwithventure.com. Your input is invaluable in making Venture a better platform for all.

### Releases

Releases are created in Github Actions via tag v.*. Keep in mind that before a release is created via a tag push, the CHANGELOG.md will have to be updated. Things to keep in mind:

1. The changelog format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
2. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

0 comments on commit 590e49d

Please sign in to comment.