Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub actions backend tests #304

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b6d0f3d
add test for HandleHTTPError
j4qfrost Aug 26, 2024
d123995
more verbose http codes
j4qfrost Aug 26, 2024
d56d930
Update Dockerfile
astrosnat Aug 26, 2024
47cb345
Update compose_dev.sh
astrosnat Aug 26, 2024
18e7b49
add failure condition test
j4qfrost Aug 26, 2024
c7690d1
Merge branch 'upstream/main'
j4qfrost Aug 27, 2024
de31424
Merge remote-tracking branch 'upstream/golang123'
j4qfrost Aug 27, 2024
3646abe
formatting and test standards
j4qfrost Aug 28, 2024
0a7fcf0
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict
j4qfrost Sep 7, 2024
df26051
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict
j4qfrost Sep 7, 2024
6cbb97c
add frontend file polling for wsl2
j4qfrost Sep 7, 2024
3bea961
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict…
j4qfrost Sep 7, 2024
5cb06fa
add workflow files
j4qfrost Sep 7, 2024
20273a6
dependencies need backend working directory
j4qfrost Sep 7, 2024
c52ac55
add macos testing
j4qfrost Sep 7, 2024
7777056
macos
j4qfrost Sep 7, 2024
5dc3ea7
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict…
j4qfrost Sep 9, 2024
f999f25
backend test workflow
j4qfrost Sep 9, 2024
e6b9476
change name
j4qfrost Sep 9, 2024
8f86e23
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict
j4qfrost Sep 9, 2024
564ad6b
Add test for HandleHTTPError (#278)
j4qfrost Aug 28, 2024
88b4854
add failure condition test (#282)
j4qfrost Aug 29, 2024
a2ccc58
Creation of Market Price Projection API (#277)
pwdel Aug 30, 2024
a1e039c
Create SECURITY.md
pwdel Sep 4, 2024
17e26a5
Adding Fees to Buying and Selling Bets (#287)
pwdel Sep 7, 2024
327e906
Frontend fixes (#286)
markokovac16 Sep 7, 2024
f10fdde
Attempting toa ddress cors related security concern. (#298)
pwdel Sep 7, 2024
f1b4d43
Drafting out reporting stats.
pwdel Sep 7, 2024
4cc882e
Add support for dependency injection to setup (#301)
ajlacey Sep 8, 2024
29eaddf
Merge branch 'upstream/main'
j4qfrost Sep 9, 2024
9692361
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict
j4qfrost Sep 12, 2024
736071f
Merge branch 'main' into feature/github-actions-backend-tests
j4qfrost Sep 12, 2024
760dea1
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict…
j4qfrost Sep 14, 2024
b451165
revert frontend change:wq
j4qfrost Sep 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Backend

on:
pull_request:
branches: [main]
workflow_dispatch:

concurrency:
group: "linux-test"
cancel-in-progress: true

jobs:
smoke:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: [ '1.23.x' ]
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Get Dependencies
working-directory: ./backend
run: |
go mod download
- name: Run tests
working-directory: ./backend
run: |
go build -o ./main && ./main &
SERVER_PID=$!
sleep 10
kill $SERVER_PID
unit:
needs: smoke
if: |
startsWith(github.head_ref, 'feature/')
|| startsWith(github.head_ref, 'fix/')
|| startsWith(github.head_ref, 'refactor/')
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: [ '1.23.x' ]
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Get Dependencies
working-directory: ./backend
run: |
go get .
- name: Run tests
working-directory: ./backend
run: go test ./...
97 changes: 97 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@
"devDependencies": {
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.17",
"is-wsl": "^3.1.0",
"postcss": "^8.4.35",
"tailwindcss": "^3.4.1",
"vite": "^5.1.7"
}
}
}
10 changes: 10 additions & 0 deletions frontend/vite.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
import { defineConfig } from 'vite';
import isWsl from 'is-wsl';
import react from '@vitejs/plugin-react';

export default defineConfig(() => {
let watchWSL = isWsl ? {
watch: {
usePolling: true,
interval: 500,
binaryInterval: 1000,
}
} : null;

return {
build: {
outDir: 'build',
},
plugins: [react()],
server: watchWSL,
};
});
1 change: 0 additions & 1 deletion scripts/docker-compose-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,3 @@ networks:
driver: bridge
frontend_network:
driver: bridge

Loading