Skip to content

Commit

Permalink
Merge b315bb6
Browse files Browse the repository at this point in the history
  • Loading branch information
fuhrmanator committed Jun 14, 2024
2 parents cb0eb51 + b315bb6 commit 952a3e7
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml → .github/workflows/ci.yml-nope
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ jobs:
mv *.puml doc-uml

- name: Push docs to current branch
if: success()
# do not try if it's a PR, since GitHub Actions checks out the code in a detached state
if: github.event_name == 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/common.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# .github/workflows/common.yml
name: Common Workflow

on:
workflow_call:
inputs:
run_docs:
description: 'Whether to run documentation steps'
required: true
type: boolean

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# List of images at https://github.com/hpi-swa/smalltalkCI#images
# Use Moose64-11 that includes our visualization tool
smalltalk: [Moose64-11]
name: ${{ matrix.smalltalk }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }} # Checkout the branch that triggered the workflow

# Prepare the CI - download the correct VM
- uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: ${{ matrix.smalltalk }}

# Run the tests
- run: smalltalkci -s ${{ matrix.smalltalk }}
shell: bash
timeout-minutes: 15

- name: Generate plantuml representation of meta-model
run: |
$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))]"
$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))]"
- name: Generate SVG Diagram from PlantUML
uses: Timmy/plantuml-action@v1
with:
args: -v -tsvg FamixTypeScript-traits.puml FamixTypeScript.puml

- name: Move diagram to doc space
if: inputs.run_docs == 'true'
run: |
mkdir -p doc-uml
mv *.svg doc-uml
mv *.puml doc-uml
- name: Push docs to current branch
if: inputs.run_docs == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add doc-uml
git commit -m "Update docs for branch ${{ github.ref_name }}"
git push origin HEAD:refs/heads/${{ github.ref_name }} # Push to the branch that triggered the workflow
13 changes: 13 additions & 0 deletions .github/workflows/pr_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# .github/workflows/pr.yml
name: PR CI

on:
pull_request:
branches:
- '*' # Trigger on any branch pull request

jobs:
build:
uses: ./.github/workflows/common.yml
with:
run_docs: false
14 changes: 14 additions & 0 deletions .github/workflows/push_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# .github/workflows/ci.yml
name: CI for push on branch

on:
push:
branches:
- '*' # Trigger on any branch push
workflow_dispatch:

jobs:
build:
uses: ./.github/workflows/common.yml
with:
run_docs: true
2 changes: 1 addition & 1 deletion doc-uml/FamixTypeScript-traits.puml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion doc-uml/FamixTypeScript-traits.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion doc-uml/FamixTypeScript.puml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@startumlhide empty membersskinparam class { BackgroundColor white ArrowColor black BorderColor darkGray}class SourceTextAnchor <<(C,white)>> #CCFFFF {}class PrimitiveType <<(C,white)>> #CCFFFF {}class Accessor <<(C,white)>> #CCFFFF {}class Type <<(C,white)>> #CCFFFF {}class IndexedFileAnchor <<(C,white)>> #CCFFFF {}class Entity <<(C,white)>> #CCFFFF {}class Invocation <<(C,white)>> #CCFFFF {}class TClassMetrics <<(T,white)>> #CCFFFF {}class Enum <<(C,white)>> #CCFFFF {}class Variable <<(C,white)>> #CCFFFF {}class ParametricInterface <<(C,white)>> #CCFFFF {}class Property <<(C,white)>> #CCFFFF {}class ParametricClass <<(C,white)>> #CCFFFF {}class Namespace <<(C,white)>> #CCFFFF {}class Method <<(C,white)>> #CCFFFF {}class ContainerEntity <<(C,white)>> #CCFFFF {}class Comment <<(C,white)>> #CCFFFF {}class FamixTypeScriptModel <<(C,white)>> #CCFFFF {}class Folder <<(C,white)>> #CCFFFF {}class ParameterType <<(C,white)>> #CCFFFF {}class TEntityCreator <<(T,white)>> #CCFFFF {}class SourceLanguage <<(C,white)>> #CCFFFF {}class Implementation <<(C,white)>> #CCFFFF {}class ParametricFunction <<(C,white)>> #CCFFFF {}class Access <<(C,white)>> #CCFFFF {}class Alias <<(C,white)>> #CCFFFF {}class TWithInterfaces <<(T,white)>> #CCFFFF {}class ParametricMethod <<(C,white)>> #CCFFFF {}class Class <<(C,white)>> #CCFFFF {}class implicitVariable <<(C,white)>> #CCFFFF {}class Reference <<(C,white)>> #CCFFFF {}class Function <<(C,white)>> #CCFFFF {}class SourcedEntity <<(C,white)>> #CCFFFF {}class ScriptEntity <<(C,white)>> #CCFFFF {}class Decorator <<(C,white)>> #CCFFFF { String expression}class SourceAnchor <<(C,white)>> #CCFFFF {}class Module <<(C,white)>> #CCFFFF {}class EnumValue <<(C,white)>> #CCFFFF {}class Inheritance <<(C,white)>> #CCFFFF {}class JSDoc <<(C,white)>> #CCFFFF {}class Import <<(C,white)>> #CCFFFF {}class ParameterConcretization <<(C,white)>> #CCFFFF {}class Parameter <<(C,white)>> #CCFFFF {}class VariableStatement <<(C,white)>> #CCFFFF {}class NamedEntity <<(C,white)>> #CCFFFF {}class Concretization <<(C,white)>> #CCFFFF {}class Interface <<(C,white)>> #CCFFFF {}class File <<(C,white)>> #CCFFFF {}SourceAnchor <|-- SourceTextAnchorType <|-- PrimitiveTypeMethod <|-- AccessorContainerEntity <|-- TypeSourceAnchor <|-- IndexedFileAnchorEntity <|-- InvocationType <|-- EnumNamedEntity <|-- VariableInterface <|-- ParametricInterfaceNamedEntity <|-- PropertyClass <|-- ParametricClassContainerEntity <|-- MethodContainerEntity <|-- NamespaceNamedEntity <|-- ContainerEntitySourcedEntity <|-- CommentNamedEntity <|-- FolderType <|-- ParameterTypeEntity <|-- SourceLanguageEntity <|-- ImplementationFunction <|-- ParametricFunctionEntity <|-- AccessNamedEntity <|-- AliasMethod <|-- ParametricMethodType <|-- ClassVariable <|-- implicitVariableEntity <|-- ReferenceContainerEntity <|-- FunctionEntity <|-- SourcedEntityContainerEntity <|-- ScriptEntityNamedEntity <|-- DecoratorEntity <|-- SourceAnchorScriptEntity <|-- ModuleNamedEntity <|-- EnumValueEntity <|-- InheritanceSourcedEntity <|-- JSDocEntity <|-- ImportEntity <|-- ParameterConcretizationNamedEntity <|-- ParameterType <|-- VariableStatementSourcedEntity <|-- NamedEntityEntity <|-- ConcretizationType <|-- InterfaceNamedEntity <|-- FileTWithInterfaces <|.. ContainerEntityTEntityCreator <|.. FamixTypeScriptModelTClassMetrics <|.. ClassDecorator "decorators*" -- "decoratedEntity" NamedEntity@enduml
@startumlhide empty membersskinparam class { BackgroundColor white ArrowColor black BorderColor darkGray}class Concretization <<(C,white)>> #CCFFFF {}class TWithInterfaces <<(T,white)>> #CCFFFF {}class Access <<(C,white)>> #CCFFFF {}class Reference <<(C,white)>> #CCFFFF {}class Method <<(C,white)>> #CCFFFF {}class IndexedFileAnchor <<(C,white)>> #CCFFFF {}class Module <<(C,white)>> #CCFFFF {}class Enum <<(C,white)>> #CCFFFF {}class Interface <<(C,white)>> #CCFFFF {}class FamixTypeScriptModel <<(C,white)>> #CCFFFF {}class Decorator <<(C,white)>> #CCFFFF { String expression}class NamedEntity <<(C,white)>> #CCFFFF {}class implicitVariable <<(C,white)>> #CCFFFF {}class ScriptEntity <<(C,white)>> #CCFFFF {}class ParametricClass <<(C,white)>> #CCFFFF {}class Function <<(C,white)>> #CCFFFF {}class TClassMetrics <<(T,white)>> #CCFFFF {}class Parameter <<(C,white)>> #CCFFFF {}class JSDoc <<(C,white)>> #CCFFFF {}class Alias <<(C,white)>> #CCFFFF {}class SourceAnchor <<(C,white)>> #CCFFFF {}class Attribute <<(C,white)>> #CCFFFF {}class ParametricInterface <<(C,white)>> #CCFFFF {}class Folder <<(C,white)>> #CCFFFF {}class ContainerEntity <<(C,white)>> #CCFFFF {}class File <<(C,white)>> #CCFFFF {}class Class <<(C,white)>> #CCFFFF {}class Type <<(C,white)>> #CCFFFF {}class ParametricMethod <<(C,white)>> #CCFFFF {}class Import <<(C,white)>> #CCFFFF {}class ParametricFunction <<(C,white)>> #CCFFFF {}class Property <<(C,white)>> #CCFFFF {}class Invocation <<(C,white)>> #CCFFFF {}class Entity <<(C,white)>> #CCFFFF {}class Accessor <<(C,white)>> #CCFFFF {}class VariableStatement <<(C,white)>> #CCFFFF {}class PrimitiveType <<(C,white)>> #CCFFFF {}class Comment <<(C,white)>> #CCFFFF {}class SourceLanguage <<(C,white)>> #CCFFFF {}class EnumValue <<(C,white)>> #CCFFFF {}class SourcedEntity <<(C,white)>> #CCFFFF {}class ParameterConcretization <<(C,white)>> #CCFFFF {}class Inheritance <<(C,white)>> #CCFFFF {}class TEntityCreator <<(T,white)>> #CCFFFF {}class Implementation <<(C,white)>> #CCFFFF {}class SourceTextAnchor <<(C,white)>> #CCFFFF {}class Variable <<(C,white)>> #CCFFFF {}class ParameterType <<(C,white)>> #CCFFFF {}class Namespace <<(C,white)>> #CCFFFF {}Entity <|-- ConcretizationEntity <|-- ReferenceContainerEntity <|-- MethodEntity <|-- AccessSourceAnchor <|-- IndexedFileAnchorScriptEntity <|-- ModuleType <|-- EnumType <|-- InterfaceNamedEntity <|-- DecoratorSourcedEntity <|-- NamedEntityVariable <|-- implicitVariableContainerEntity <|-- ScriptEntityClass <|-- ParametricClassContainerEntity <|-- FunctionNamedEntity <|-- ParameterSourcedEntity <|-- JSDocNamedEntity <|-- AliasEntity <|-- SourceAnchorNamedEntity <|-- AttributeInterface <|-- ParametricInterfaceNamedEntity <|-- FolderNamedEntity <|-- ContainerEntityNamedEntity <|-- FileType <|-- ClassContainerEntity <|-- TypeMethod <|-- ParametricMethodEntity <|-- ImportFunction <|-- ParametricFunctionNamedEntity <|-- PropertyEntity <|-- InvocationType <|-- VariableStatementMethod <|-- AccessorType <|-- PrimitiveTypeSourcedEntity <|-- CommentEntity <|-- SourceLanguageNamedEntity <|-- EnumValueEntity <|-- ParameterConcretizationEntity <|-- SourcedEntityEntity <|-- ImplementationSourceAnchor <|-- SourceTextAnchorEntity <|-- InheritanceNamedEntity <|-- VariableType <|-- ParameterTypeContainerEntity <|-- NamespaceTEntityCreator <|.. FamixTypeScriptModelTWithInterfaces <|.. ContainerEntityTClassMetrics <|.. ClassDecorator "decorators*" -- "decoratedEntity" NamedEntity@enduml
Expand Down
2 changes: 1 addition & 1 deletion doc-uml/FamixTypeScript.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 952a3e7

Please sign in to comment.