Skip to content

Commit

Permalink
Merge branch 'main' into 188-make-all-users-follow-sac-super-club
Browse files Browse the repository at this point in the history
  • Loading branch information
DOOduneye authored Feb 21, 2024
2 parents 902ecbc + 58ce174 commit 9fab181
Show file tree
Hide file tree
Showing 82 changed files with 12,915 additions and 2,513 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: Backend

permissions: read-all

on:
push:
paths:
- "backend/**"
- ".github/workflows/backend.yml"
- backend/**
- .github/workflows/backend.yml
pull_request:
types: opened
types: [opened]
paths:
- "backend/**"
- ".github/workflows/backend.yml"
- backend/**
- .github/workflows/backend.yml

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -25,7 +27,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
go-version: "1.22"
- name: Cache Go Modules
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -54,7 +56,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.21"
go-version: "1.22"
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand All @@ -79,7 +81,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
go-version: "1.22"
- name: Cache Go Modules
uses: actions/cache@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/backend_codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "backend/**"
- ".github/workflows/backend_codeql.yml"
pull_request:
types: opened
types: [opened]
paths:
- "backend/**"
- ".github/workflows/backend_codeql.yml"
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
go-version: "1.22"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: CLI

permissions: read-all

on:
push:
paths:
- "cli/**"
- ".github/workflows/cli.yml"
- cli/**
- .github/workflows/cli.yml
pull_request:
types: opened
types: [opened]
paths:
- "cli/**"
- ".github/workflows/cli.yml"
- cli/**
- .github/workflows/cli.yml

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -25,7 +27,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
go-version: "1.22"
- name: Cache Go Modules
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -54,7 +56,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.21"
go-version: "1.22"
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cli_codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "cli/**"
- ".github/workflows/cli_codeql.yml"
pull_request:
types: opened
types: [opened]
paths:
- "cli/**"
- ".github/workflows/cli_codeql.yml"
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
go-version: "1.22"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/mobile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Mobile

permissions: read-all

on:
push:
paths:
- frontend/sac-mobile/**
- .github/workflows/mobile.yml
pull_request:
types: opened
paths:
- frontend/sac-mobile/**
- .github/workflows/mobile.yml

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
cache-dependency-path: frontend/sac-mobile/yarn.lock

- name: Install dependencies
run: |
cd frontend/sac-mobile
yarn install
- name: Lint
run: |
cd frontend/sac-mobile
yarn lint
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
cache-dependency-path: frontend/sac-mobile/yarn.lock

- name: Install dependencies
run: |
cd frontend/sac-mobile
yarn install
- name: Test
run: |
cd frontend/sac-mobile
yarn test
2 changes: 1 addition & 1 deletion .github/workflows/mobile_codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "frontend/sac-mobile/**"
- ".github/workflows/mobile_codeql.yml"
pull_request:
types: opened
types: [opened]
paths:
- "frontend/sac-mobile/**"
- ".github/workflows/mobile_codeql.yml"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/web_codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "frontend/sac-web/**"
- ".github/workflows/mweb_codeql.yml"
pull_request:
types: opened
types: [opened]
paths:
- "frontend/sac-web/**"
- ".github/workflows/web_codeql.yml"
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
.env
sac-cli
node_modules
.vscode
.trunk
.trunk
24 changes: 14 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@

To install use `./install.sh` and then run `sac-cli` to see all commands.

```console
```console
NAME:
sac-cli - CLI for SAC

Expand All @@ -138,24 +138,28 @@

COMMANDS:
swagger, swag Updates the swagger documentation
be Run the backend
test, t Runs tests
format, f Runs formatting tools
lint, l Runs linting tools
help, h Shows a list of commands or help for one command
CI:
format, f Runs formatting tools
lint, l Runs linting tools
* can use --fix to fix linting errors for frontend
Database Operations:
clean Remove databases used for testing
migrate Migrate the database, creating tables and relationships
insert, i Inserts mock data into the database
reset, r Resets the database, dropping all tables, clearing data, and re-running migrations
clean, c Remove databases used for testing
migrate, m Migrate the database, creating tables and relationships
reset, r Resets the database, dropping all tables, clearing data, and re-running migrations
* can use --data to just reset data and not drop tables
drop, d Drop data with a migration or drops the entire database
insert, i Inserts mock data into the database
drop, d Drop data with a migration or drops the entire database
* can use --data to just drop data and not drop tables

Development:
be Run the backend
fe Run the frontend

GLOBAL OPTIONS:
--help, -h show help
```

# Git Flow

1. **Create a new branch**
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
alt="Mobile CodeQL Workflow Status" />
</a>

<a href="https://github.com/GenerateNU/sac/actions/workflows/mobile.yml">
<img src="https://github.com/GenerateNU/sac/actions/workflows/mobile.yml/badge.svg"
alt="Mobile Workflow Status" />
</a>

<br />

<a href="https://github.com/GenerateNU/sac/actions/workflows/web_codeql.yml">
Expand Down
28 changes: 13 additions & 15 deletions backend/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,41 @@ module github.com/GenerateNU/sac/backend
go 1.22.0

require (
github.com/garrettladley/mattress v0.2.2
github.com/garrettladley/mattress v0.3.2
github.com/go-playground/validator/v10 v10.18.0
github.com/goccy/go-json v0.10.2
github.com/gofiber/fiber/v2 v2.52.0
github.com/gofiber/swagger v1.0.0
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/google/uuid v1.6.0
github.com/h2non/gock v1.2.0
github.com/huandu/go-assert v1.1.6
github.com/mcnijman/go-emailaddress v1.1.1
github.com/mitchellh/mapstructure v1.5.0
github.com/spf13/viper v1.18.2
github.com/swaggo/swag v1.16.3
gorm.io/driver/postgres v1.5.4
gorm.io/gorm v1.25.6
golang.org/x/crypto v0.19.0
golang.org/x/text v0.14.0
gorm.io/driver/postgres v1.5.6
gorm.io/gorm v1.25.7
)

require (
github.com/awnumar/memcall v0.2.0 // indirect
github.com/awnumar/memguard v0.22.4 // indirect
github.com/h2non/gock v1.2.0 // indirect
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 // indirect
)

require (
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/awnumar/memcall v0.2.0 // indirect
github.com/awnumar/memguard v0.22.4 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.6 // indirect
github.com/go-openapi/spec v0.20.4 // indirect
github.com/go-openapi/swag v0.19.15 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/spec v0.20.14 // indirect
github.com/go-openapi/swag v0.22.9 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
Expand All @@ -53,12 +51,13 @@ require (
github.com/klauspost/compress v1.17.0 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
Expand All @@ -75,8 +74,7 @@ require (
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/tools v0.13.0 // indirect
golang.org/x/tools v0.18.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 9fab181

Please sign in to comment.