fix tests, add CI, fix on mac, extend docs (#25)
* tests: fix float problems and PAT problem * extend CONTRIBUTING.md * extend build documentation, add GH action, fix build on MacOS * fix build on Vercel * update .gitignore and CONTRIBUTING.md * fix all tests * add backend tests to CI * make e2e tests work * add debug log to e2e test * ignore copied tests in CI
This commit is contained in:
@@ -2,12 +2,15 @@
|
||||
|
||||
## Local Development
|
||||
|
||||
To run and test GitHub-Stats-Extended, you need to follow a few simple steps:
|
||||
To set up the project GitHub-Stats-Extended locally, run the following commands:
|
||||
|
||||
1. create [your own deployment](../docs/deploy.md)
|
||||
2. optional: add an SQL database; by using e.g. the ["Nile" integration](https://vercel.com/marketplace/nile) or by manually setting the environment variable `POSTGRES_URL`
|
||||
3. optional: [create your own OAuth App](https://github.com/settings/developers) and set environment variables `OAUTH_REDIRECT_URI`, `OAUTH_CLIENT_ID` and `OAUTH_CLIENT_SECRET` on Vercel accordingly
|
||||
4. optional: in addition to the Vercel project based on the `backend` folder, create a second project based on the `frontend/frontend` folder. No environment variables needed.
|
||||
```bash
|
||||
./vercel-preparation.sh
|
||||
(cd ./backend/ && npm install)
|
||||
(cd ./frontend/frontend/ && yarn install && yarn build-trends)
|
||||
```
|
||||
|
||||
The easiest way to run and test the project is to deploy it to Vercel as described in the [deployment guide](../docs/deploy.md).
|
||||
|
||||
## Themes Contribution
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
name: Basic Build
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Allows you to run this manually from the Actions tab
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
execute:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: latest
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install -g yarn
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install and Build
|
||||
run: |
|
||||
chmod +x ./vercel-preparation.sh
|
||||
./vercel-preparation.sh
|
||||
(cd ./backend/ && npm install)
|
||||
(cd ./frontend/frontend/ && yarn install && yarn build-trends)
|
||||
|
||||
- name: Run Backend Tests
|
||||
run: |
|
||||
(cd ./backend/ && npm test)
|
||||
Reference in New Issue
Block a user