Skip to content

Commit

Permalink
Merge pull request #62 from erik-sth/restructured-code-added-server+t…
Browse files Browse the repository at this point in the history
…ests

Restructured code added server+tests
  • Loading branch information
erik-sth authored Dec 10, 2023
2 parents 3740b71 + 4793a3b commit 08c616f
Show file tree
Hide file tree
Showing 34 changed files with 2,716 additions and 200 deletions.
53 changes: 28 additions & 25 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,40 @@
name: Build and Test

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
push:
branches: ['main']
pull_request:
branches: ['main']

jobs:
test:
runs-on: ubuntu-latest
test:
runs-on: ubuntu-latest
environment: prod
strategy:
matrix:
node-version: [18]

strategy:
matrix:
node-version: [18]
steps:
- name: Checkout code
uses: actions/checkout@v3

steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies
run: npm ci

- name: Install dependencies
run: npm ci
- name: Set up environment variables
run: echo "MONGODB_URI=${{ secrets.MONGODB_URI }}" >> $GITHUB_ENV

- name: Build
run: npm run build
- name: Build
run: npm run build

- name: List build artifacts
run: ls dist
- name: List build artifacts
run: ls dist

- name: Run tests
run: npm test
- name: Run tests
run: npm test
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
dist
dist
.env
4 changes: 2 additions & 2 deletions benchmark/timeDistribution.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { main } from '../src/alg/TimeDistribution';
import { main } from '../src/alg/StudentDistribution';
import { getItems } from '../src/data/Items';
import { getPolls } from '../src/data/Polls';
import { getProject } from '../src/data/Projects';
Expand All @@ -14,7 +14,7 @@ interface BenchmarkResults {
timestamp: string;
}

const project = getProject();
const project = getProject('projectId1');
const projectId = project._id;
const items = getItems(projectId);
const students = getStudents(projectId);
Expand Down
Loading

0 comments on commit 08c616f

Please sign in to comment.