-
-
Notifications
You must be signed in to change notification settings - Fork 29
100 lines (91 loc) · 2.63 KB
/
build.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
name: MMPM Build Pipeline
on:
push:
branches:
- "*"
tags:
- "*"
pull_request:
branches:
- "*"
jobs:
mmpm-cli:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache Python Dependencies
uses: actions/cache@v2
with:
python-version: ${{ matrix.python-version }}
path: |
~/.cache/pip
key: ${{ runner.os }}-python-${{ hashFiles('**/pyproject.toml') }}
- name: Python Dependencies
run: |
python -m pip install pdm
yes | mypy mmpm --install-types || true
pdm install
- name: Python Tests
run: |
pdm run lint
pdm run mypy
pdm run test
pdm run report
- name: Python Build
run: |
pdm build
- name: Install Test
run: |
pdm install
./__pypackages/${{ matrix.python-version }}/bin/mmpm version
./__pypackages/${{ matrix.python-version }}/bin/mmpm --help
mmpm-ui:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["16.x", "18.x"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache Node Modules
uses: actions/cache@v2
with:
path: |
'**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Angular Dependencies
run: |
cd ui && npm install --legacy-peer-deps
- name: Angular Tests
run: |
cd ui && npm run lint
- name: Angular Build
run: |
cd ui && ./node_modules/@angular/cli/bin/ng.js build --configuration production --output-hashing none --base-href /
#package-and-publish:
# needs: [mmpm-cli, mmpm-ui]
# runs-on: ubuntu-latest
# container:
# image: beemar/python3-nodejs:python${PYTHON_VERSION}-nodejs${NODEJS_VERSION}
# steps:
# - uses: actions/checkout@v3
# - name: Package Application
# run: |
# - name: Publish to PyPi
# if: github.ref == 'refs/heads/master' && startsWith(github.ref, 'refs/tags/')
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# password: ${{ secrets.PYPI_TOKEN }}
# skip_existing: true
# verbose: true