Skip to content

Commit 6df4981

Browse files
authored
Merge pull request #18 from fuhrmanator/M11-migration
M11 migration
2 parents 4e8b94b + db9eb5f commit 6df4981

File tree

85 files changed

+3162
-566
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+3162
-566
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.github/workflows/ci.yml-nope

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Name of the project in the GitHub action panel
2+
name: Run-Tests-and-Generate-Model-Diagram
3+
4+
# Execute the CI on push or pull request on any branch
5+
on:
6+
push:
7+
branches:
8+
- '*' # Allow the workflow to trigger on any branch
9+
pull_request:
10+
branches:
11+
- '*' # Allow the workflow to trigger on any branch
12+
workflow_dispatch:
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
# List of images at https://github.com/hpi-swa/smalltalkCI#images
20+
# Use Moose64-11 that includes our visualization tool
21+
smalltalk: [ Moose64-11]
22+
name: ${{ matrix.smalltalk }}
23+
steps:
24+
# Checkout the code from the branch that triggered the workflow
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
with:
28+
ref: ${{ github.ref }} # Checkout the branch that triggered the workflow
29+
30+
# Prepare the CI - download the correct VM
31+
- uses: hpi-swa/setup-smalltalkCI@v1
32+
with:
33+
smalltalk-image: ${{ matrix.smalltalk }}
34+
35+
# Run the tests
36+
- run: smalltalkci -s ${{ matrix.smalltalk }}
37+
shell: bash
38+
timeout-minutes: 15
39+
40+
- name: Generate plantuml representation of meta-model
41+
run: |
42+
$SMALLTALK_CI_VM $SMALLTALK_CI_IMAGE eval "'FamixTypeScript-traits.puml' asFileReference writeStreamDo: [ :stream | stream nextPutAll: (FamixUMLDocumentor new model: FamixTypeScriptModel color: Color lightBlue ; beWithStubs ; generate; exportWith: (FamixUMLPlantUMLBackend new))]"
43+
$SMALLTALK_CI_VM $SMALLTALK_CI_IMAGE eval "'FamixTypeScript.puml' asFileReference writeStreamDo: [ :stream | stream nextPutAll: (FamixUMLDocumentor new model: FamixTypeScriptModel color: Color lightBlue ; generate; exportWith: (FamixUMLPlantUMLBackend new))]"
44+
45+
- name: Generate SVG Diagram from PlantUML
46+
uses: Timmy/plantuml-action@v1
47+
with:
48+
args: -v -tsvg FamixTypeScript-traits.puml FamixTypeScript.puml
49+
50+
- name: Move diagram to doc space
51+
run: |
52+
mkdir -p doc-uml
53+
mv *.svg doc-uml
54+
mv *.puml doc-uml
55+
56+
- name: Push docs to current branch
57+
# do not try if it's a PR, since GitHub Actions checks out the code in a detached state
58+
if: github.event_name == 'push'
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
run: |
62+
git config --global user.name 'github-actions[bot]'
63+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
64+
git add doc-uml
65+
git commit -m "Update docs for branch ${{ github.ref_name }}"
66+
git push origin HEAD:refs/heads/${{ github.ref_name }} # Push to the branch that triggered the workflow

.github/workflows/common.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# .github/workflows/common.yml
2+
name: Common Workflow
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
run_docs:
8+
description: 'Whether to run documentation steps'
9+
required: true
10+
type: boolean
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
# List of images at https://github.com/hpi-swa/smalltalkCI#images
18+
# Use Moose64-11 that includes our visualization tool
19+
smalltalk: [Moose64-11]
20+
name: ${{ matrix.smalltalk }}
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
with:
25+
ref: ${{ github.ref }} # Checkout the branch that triggered the workflow
26+
27+
# Prepare the CI - download the correct VM
28+
- uses: hpi-swa/setup-smalltalkCI@v1
29+
with:
30+
smalltalk-image: ${{ matrix.smalltalk }}
31+
32+
# Run the tests
33+
- run: smalltalkci -s ${{ matrix.smalltalk }}
34+
shell: bash
35+
timeout-minutes: 15
36+
37+
- name: Generate plantuml representation of meta-model
38+
run: |
39+
$SMALLTALK_CI_VM $SMALLTALK_CI_IMAGE eval "'FamixTypeScript-traits.puml' asFileReference writeStreamDo: [ :stream | stream nextPutAll: (FamixUMLDocumentor new model: FamixTypeScriptModel color: Color lightBlue ; beWithStubs ; generate; exportWith: (FamixUMLPlantUMLBackend new))]"
40+
$SMALLTALK_CI_VM $SMALLTALK_CI_IMAGE eval "'FamixTypeScript.puml' asFileReference writeStreamDo: [ :stream | stream nextPutAll: (FamixUMLDocumentor new model: FamixTypeScriptModel color: Color lightBlue ; generate; exportWith: (FamixUMLPlantUMLBackend new))]"
41+
- name: Generate SVG Diagram from PlantUML
42+
uses: Timmy/plantuml-action@v1
43+
with:
44+
args: -v -tsvg FamixTypeScript-traits.puml FamixTypeScript.puml
45+
46+
- name: Move diagram to doc space
47+
if: inputs.run_docs == 'true'
48+
run: |
49+
mkdir -p doc-uml
50+
mv *.svg doc-uml
51+
mv *.puml doc-uml
52+
53+
- name: Push docs to current branch
54+
if: inputs.run_docs == 'true'
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
run: |
58+
git config --global user.name 'github-actions[bot]'
59+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
60+
git add doc-uml
61+
git commit -m "Update docs for branch ${{ github.ref_name }}"
62+
git push origin HEAD:refs/heads/${{ github.ref_name }} # Push to the branch that triggered the workflow

.github/workflows/pr_ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# .github/workflows/pr.yml
2+
name: PR CI
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- '*' # Trigger on any branch pull request
8+
9+
jobs:
10+
build:
11+
uses: ./.github/workflows/common.yml
12+
with:
13+
run_docs: false

.github/workflows/push_ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# .github/workflows/ci.yml
2+
name: CI for push on branch
3+
4+
on:
5+
push:
6+
branches:
7+
- '*' # Trigger on any branch push
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
uses: ./.github/workflows/common.yml
13+
with:
14+
run_docs: true

Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11

22
# FamixNG Metamodel for TypeScript.
33

4-
[![Smalltalk CI](https://github.com/fuhrmanator/FamixTypeScript/actions/workflows/ci.yml/badge.svg)](https://github.com/fuhrmanator/FamixTypeScript/actions/workflows/ci.yml)
4+
[![Smalltalk CI](https://github.com/fuhrmanator/FamixTypeScript/actions/workflows/ci.yml/badge.svg?branch=M11-migration)](https://github.com/fuhrmanator/FamixTypeScript/actions/workflows/ci.yml?query=branch:M11-migration)
55

66
This project is normally synchronized with [FamixTypeScriptImporter](https://github.com/fuhrmanator/FamixTypeScriptImporter) as it is the FamixNG metamodel it supports.
77

88
## Metamodel documentation (visualization)
99

1010
The following was generated by CI.
1111

12-
![FamixTypeScript Metamodel](./doc-uml/FamixTypeScript.svg)
12+
![FamixTypeScript Metamodel](./doc-uml/FamixTypeScript-traits.svg)
1313

1414
## Loading from a playground
1515

0 commit comments

Comments
 (0)