Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
60 changes: 43 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,41 @@ jobs:

steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

- name: Bump version and push tag 🏷
id: tag
uses: anothrNick/github-tag-action@1.36.0
uses: anothrNick/github-tag-action@1.71.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true

- name: Install pnpm ⚙
uses: pnpm/action-setup@v2.2.2
uses: pnpm/action-setup@v4
with:
version: 8

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v4
name: Setup pnpm cache
with:
version: 7
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-


- name: Install treemaps library 📦
run: |
cd frontend
git clone --branch hiviser_deployment https://${{ secrets.SEERENE_TREEMAPS_DEPLOY_USER }}:${{ secrets.SEERENE_TREEMAPS_DEPLOY_TOKEN }}@gitlab.hpi3d.de/seerene/treemaps.git
cd treemaps
cd frontend/treemap-renderer
npm install
npm run build-lib
npm run build

- name: Build Embedding 🛠
run: |
Expand All @@ -58,27 +72,39 @@ jobs:
steps:
# To use this repository's private action, we must check out the repository
- name: Checkout 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup pnpm ⚙️
uses: pnpm/action-setup@v2.2.2
uses: pnpm/action-setup@v4
with:
version: 7
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install Node 🟢
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 22
cache: "pnpm"
cache-dependency-path: frontend/pnpm-lock.yaml

- name: Install treemaps library 📦
run: |
cd frontend
git clone --branch hiviser_deployment https://${{ secrets.SEERENE_TREEMAPS_DEPLOY_USER }}:${{ secrets.SEERENE_TREEMAPS_DEPLOY_TOKEN }}@gitlab.hpi3d.de/seerene/treemaps.git
cd treemaps
cd frontend/treemap-renderer
npm install
npm run build-lib
npm run build

- name: Install and Build Pages 🔧
run: |
Expand Down
31 changes: 22 additions & 9 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,40 @@ jobs:

steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

- name: Install pnpm ⚙
uses: pnpm/action-setup@v2.2.2
uses: pnpm/action-setup@v4
with:
version: 7
version: 8

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install Node 🟢
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 22
cache: "pnpm"
cache-dependency-path: frontend/pnpm-lock.yaml

- name: Install treemaps library 📦
run: |
cd frontend
git clone --branch hiviser_deployment https://${{ secrets.SEERENE_TREEMAPS_DEPLOY_USER }}:${{ secrets.SEERENE_TREEMAPS_DEPLOY_TOKEN }}@gitlab.hpi3d.de/seerene/treemaps.git
cd treemaps
cd frontend/treemap-renderer
npm install
npm run build-lib
npm run build

- name: Install and Build 🔧
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
# To use this repository's private action,
# we must check out the repository
- name: Checkout 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run Action 🚀
uses: ./ # Uses the action in the root directory
uses: ./ # Uses our action in the root directory
with:
benchmark: true
# repository_path: ./testrepo
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"svg.preview.background": "custom"
}
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM node:22
FROM node:22-alpine

RUN apk add tokei
RUN npm install pnpm --location=global

ARG repository_path=./
Expand All @@ -10,11 +11,11 @@ COPY analytics/src ./src
COPY analytics/package.json .
COPY analytics/pnpm-lock.yaml .
COPY analytics/tsconfig.json .
RUN mkdir /metrics

RUN pnpm install
RUN pnpm run build

RUN curl -vL --compressed https://github.com/XAMPPRocky/tokei/releases/download/v12.1.2/tokei-x86_64-unknown-linux-gnu.tar.gz --output tokei.tar.gz
RUN tar -xvf tokei.tar.gz
RUN tokei /repository --output json > /metrics/metrics.json

CMD [ "node", "/build/index.js" ]
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run Analytics Treemap Embedding Action 🚀
uses: hpicgs/github-software-analytics-embedding@v0
Expand Down Expand Up @@ -84,3 +84,8 @@ This repo uses the github git database API to store commit based software analyt
```
docker build -t analytics . && docker run -it analytics
```
## Testing Pipelines Locally
https://github.com/nektos/act
```
gh extensions exec act
```
3 changes: 0 additions & 3 deletions analytics/metrics.csv

This file was deleted.

32 changes: 17 additions & 15 deletions analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "github-software-analytics-embedding",
"description": "Seminar Project of the Seminar \"Advanced Techniques for Analysis and Visualization of Software Data\" of CGS, HPI and DEF in the Summer Term 2022",
"type": "module",
"scripts": {
"start": "cross-env REPOSITORY_PATH=../analytics/src ts-node src/index.ts",
"debug": "cross-env DEBUG=True REPOSITORY_PATH=../analytics/src ts-node src/index.ts",
"build": "tsc"
},
},
"repository": {
"type": "git",
"url": "git+https://github.com/hpicgs/github-software-analytics-embedding.git"
Expand All @@ -16,22 +17,23 @@
},
"homepage": "https://github.com/hpicgs/github-software-analytics-embedding#readme",
"dependencies": {
"@octokit/auth-action": "^1.3.3",
"@octokit/auth-action": "^5.1.1",
"csv-writer": "^1.6.0",
"dotenv": "^16.0.1",
"glob": "^8.0.3",
"octokit": "^1.8.1",
"typescript": "^4.7.3"
"dotenv": "^16.4.7",
"glob": "^11.0.0",
"octokit": "^4.0.2",
"pino": "^9.5.0",
"typescript": "^5.7.2"
},
"devDependencies": {
"@octokit/types": "^6.38.1",
"@tsconfig/node16": "^1.0.2",
"@types/glob": "^7.2.0",
"@types/node": "^17.0.36",
"@typescript-eslint/eslint-plugin": "^5.26.0",
"@typescript-eslint/parser": "^5.26.0",
"@octokit/types": "^13.6.2",
"@tsconfig/node16": "^16.1.3",
"@types/glob": "^8.1.0",
"@types/node": "^22.10.1",
"@typescript-eslint/eslint-plugin": "^8.18.0",
"@typescript-eslint/parser": "^8.18.0",
"cross-env": "^7.0.3",
"eslint": "^8.16.0",
"ts-node": "^10.8.0"
"eslint": "^9.16.0",
"ts-node": "^10.9.2"
}
}
}
Loading
Loading