-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github workflow, pr template, cleaning up the frontend a bit
- Loading branch information
Showing
15 changed files
with
1,533 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Description | ||
|
||
[Link to Ticket](insert the link to your ticket inside the parenthesis here) | ||
|
||
Please include a summary of the changes and the related issue. Please also | ||
include relevant motivation, context, and images! If its a frontend ticket, | ||
screenshots are important, if its a backend ticket, please add pictures of | ||
relevant postman screenshots or console printouts. | ||
|
||
# How Has This Been Tested? | ||
|
||
Please describe the tests that you ran to verify your changes. If they are unit | ||
tests, provide the file name the tests are in. If they are not unit tests, | ||
describe how you tested the change. | ||
|
||
# Checklist | ||
|
||
- [ ] I have performed a self-review of my code | ||
- [ ] I have reached out to another developer to review my code | ||
- [ ] I have commented my code, particularly in hard-to-understand areas | ||
- [ ] New and existing unit tests pass locally with my changes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
name: CI (Linting, Testing, Building) | ||
|
||
on: | ||
push: | ||
branches: ['main'] | ||
pull_request: | ||
branches: ['main'] | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
go-version: [1.25.x] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Lint Go code | ||
run: make backend-lint | ||
|
||
- name: Lint Frontend code | ||
run: make frontent-lint | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
go-version: [1.21.x] | ||
container: node:latest | ||
|
||
services: | ||
postgres: | ||
image: postgres:latest | ||
env: | ||
POSTGRES_PASSWORD: pwd | ||
POSTGRES_USER: user | ||
POSTGRES_DB: algo | ||
ports: | ||
- 5432:5432 | ||
options: >- | ||
--health-cmd pg_isready --health-interval 10s --health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- name: Install PostgreSQL client | ||
run: | | ||
apt-get update | ||
apt-get install --yes postgresql-client | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Import DB seed data | ||
run: | ||
psql -d postgresql://user:[email protected]:5432/algo -f init.sql | ||
working-directory: ./backend/db/migrations | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Install Task | ||
uses: arduino/setup-task@v1 | ||
with: | ||
version: 3.x | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Run Go tests | ||
run: | | ||
task test-all | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
go-version: [1.21.x] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js ${{ matrix.node-version }} | ||
uses: ./.github/actions/install-node | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Build Go app | ||
run: | | ||
go build -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* eslint-env node */ | ||
module.exports = { | ||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint'], | ||
root: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"arrowParens": "avoid", | ||
"bracketSpacing": true, | ||
"bracketSameLine": true, | ||
"printWidth": 80, | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"useTabs": false | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module.exports = function(api) { | ||
export default function(api) { | ||
api.cache(true); | ||
return { | ||
presets: ['babel-preset-expo'], | ||
plugins: ["nativewind/babel"], | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const API_LINK = "http://localhost:8080" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import axios, { AxiosResponse } from 'axios'; | ||
import { API_LINK } from './CommonURLS'; | ||
import { User } from '../types/types'; | ||
|
||
export const getAllUsers = async (): Promise<User[]> => { | ||
const response: AxiosResponse<User[]> = await axios.get<User[]>(`${API_LINK}/users`); | ||
return response.data; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
/** @type {import('tailwindcss').Config} */ | ||
|
||
module.exports = { | ||
content: [ | ||
"./App.{js,jsx,ts,tsx}", | ||
"./components/**/*.{js,jsx,ts,tsx}", | ||
"./public/**/*.{js,jsx,ts,tsx}", | ||
"./screens/**/*.{js,jsx,ts,tsx}", | ||
"./services/**/*.{js,jsx,ts,tsx}" | ||
], | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
} | ||
export const content = [ | ||
"./App.{js,jsx,ts,tsx}", | ||
"./components/**/*.{js,jsx,ts,tsx}", | ||
"./public/**/*.{js,jsx,ts,tsx}", | ||
"./screens/**/*.{js,jsx,ts,tsx}", | ||
"./services/**/*.{js,jsx,ts,tsx}" | ||
]; | ||
export const theme = { | ||
extend: {}, | ||
}; | ||
export const plugins = []; |
Empty file.
Oops, something went wrong.