Skip to content

Commit

Permalink
Update testAndBuild.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
badetitou authored Jul 20, 2021
1 parent 188b7b2 commit 004676b
Showing 1 changed file with 39 additions and 3 deletions.
42 changes: 39 additions & 3 deletions .github/workflows/testAndBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: CI
on:
push:
branches:
- master
- v2

jobs:
build:
Expand All @@ -14,17 +14,53 @@ jobs:
PROJECT_NAME: ${{ matrix.smalltalk }}-FAST
strategy:
matrix:
smalltalk: [ Moose64-8.0 ]
smalltalk: [ Moose64-9.0 ]
name: ${{ matrix.smalltalk }}
steps:
- uses: actions/checkout@v2
- uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-version: ${{ matrix.smalltalk }}
smalltalk-image: ${{ matrix.smalltalk }}
- run: smalltalkci -s ${{ matrix.smalltalk }}
shell: bash
timeout-minutes: 15

- name: Build meta-model planuml image
run: |
$SMALLTALK_CI_VM $SMALLTALK_CI_IMAGE eval "'fast-core.puml' asFileReference writeStreamDo: [ :stream | stream nextPutAll: (FamixMMUMLDocumentor new model: FASTModel; beWithStub; generatePlantUMLModelWithout: { FASTModel })]."
- name: Generate Coaster PNG Diagrams
uses: cloudbees/plantuml-github-action@master
with:
args: -v -tpng fast-core.puml

- name: Move UML
run: |
mkdir doc-uml
mv *.png doc-uml
- name: Init new repo UML in doc-uml folder and commit generated files
run: |
cd doc-uml/
git init
git add -A
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m 'update doc'
# Careful, this can kill your project
- name: Force push to destination branch
uses: ad-m/github-push-action@v0.5.0
with:
# Token for the repo. Can be passed in using $\{{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
# Destination branch to push changes
branch: v2/doc
# We have to push from the folder where files were generated.
# Same were the new repo was initialized in the previous step
directory: ./doc-uml

- name: package
run: |
mv /home/runner/.smalltalkCI/_builds/* .
Expand Down

0 comments on commit 004676b

Please sign in to comment.