-
Notifications
You must be signed in to change notification settings - Fork 3
133 lines (133 loc) · 4.36 KB
/
codecommitWorkflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
---
name: Code Commit - Workflow
# Trigger the workflow on push to any branch except master
on:
push:
branches-ignore:
- 'master'
jobs:
spell-check:
name: markdown spell check
runs-on: ubuntu-latest
steps:
- name: Check out code.
uses: actions/checkout@v2
- name: Spelling check via PySpelling
uses: rojopolis/[email protected]
super-linter:
# Job name
name: lint-code-base-using-super-linter
# Set the agent to run on
runs-on: ubuntu-latest
# Load all steps
steps:
# Checkout the code base
- name: Check out code
uses: actions/checkout@v2
# Run Linter against code base
- name: Lint code base
uses: docker://github/super-linter:v3
env:
VALIDATE_ALL_CODEBASE: true # will parse the entire repository and find all files to validate across all types. NOTE: When set to false, only new or edited files will be parsed for validation.
DEFAULT_BRANCH: master
VALIDATE_YAML: true
VALIDATE_JSON: true
VALIDATE_MD: true
VALIDATE_BASH: true # by default validates against POSIX rules, scripts using #!/bin/bash shebang
VALIDATE_JAVASCRIPT_ES: true # (Utilizing: eslint)
VALIDATE_DOCKER: true
ACTIONS_RUNNER_DEBUG: false # Flag to enable additional information about the linter, versions, and additional output.
DISABLE_ERROR: false # Flag to have the linter complete with exit code 0 even if errors were detected.
DEFAULT_WORKSPACE: /tmp/lint
validate-JSON-schema:
name: validate-JSON-schema
runs-on: ubuntu-latest
steps:
- name: Check out code.
uses: actions/checkout@v2
- name: Validate src/mission.json against JSON Schema
uses: docker://orrosenblatt/validate-json-action:latest
env:
INPUT_SCHEMA: ./src/missions.schema.json
INPUT_JSONS: ./src/missions.json
react-linting-and-testing:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Packages
run: npm install
- name: Lint application
run: npm run lint
- name: Test application
run: CI=test npm run test
- name: Run test coverage report
run: npm run coverage
uml-validation:
name: uml-validation
needs: react-linting-and-testing
runs-on: ubuntu-latest
steps:
- name: Check out code.
uses: actions/checkout@v2
- name: Validate UML
uses: ./.github/actions/uml-validation
generate-SVG:
name: generate-svg
needs: uml-validation
runs-on: ubuntu-latest
steps:
- name: Check out code.
uses: actions/checkout@v2
- name: Generate SVG from UML
uses: ./.github/actions/generate-svg
- name: Print working directories
shell: bash
run: |
echo "${{ github.workspace }}" ${{ github.workspace }}
- name: Upload SVG files
uses: actions/upload-artifact@v2
with:
name: generated-SVG-files
path: ./src/sequences/**/images/*.svg
env:
PUSH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload generated SVG base images
uses: actions/upload-artifact@v2
with:
name: generated-SVG-base-images
path: ./images/*.svg
env:
PUSH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
commit-SVG:
name: commit-svg
needs: generate-SVG
runs-on: ubuntu-latest
steps:
- name: Check out code.
uses: actions/checkout@v2
- name: Download previously generated SVG files
uses: actions/download-artifact@v2
with:
name: generated-SVG-files
path: ./src/sequences
- name: Download previously generated SVG base images
uses: actions/download-artifact@v2
with:
name: generated-SVG-base-images
path: ./images
- name: Commit changes
uses: EndBug/add-and-commit@v4
with:
author_name: "tom-halpin"
author_email: "[email protected]"
message: "Committing workflow generated SVG files"
add: "--all"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}