-
Notifications
You must be signed in to change notification settings - Fork 6
58 lines (57 loc) · 1.52 KB
/
ci.yaml
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
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
getPackages:
runs-on: ubuntu-latest
outputs:
matrix: ${{ env.matrix }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- id: set-matrix
run: echo "matrix=$(python3 ./scripts/get_packages.py)" >> $GITHUB_ENV
- name: Read matrix into env.matrix
run: echo ${{ env.matrix }}
build:
runs-on: ubuntu-latest
needs:
- getPackages
strategy:
matrix: ${{fromJSON(needs.getPackages.outputs.matrix)}}
defaults:
run:
working-directory: ${{ matrix.package }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Setup Node.js
uses: actions/setup-node@master
with:
node-version: 'v18.16.0'
- name: Install poetry
run: curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: poetry install
- name: Plugins Codegen
run: yarn codegen
working-directory: packages/polywrap
- name: Typecheck
run: poetry run tox -e typecheck
- name: Lint
run: poetry run tox -e lint
- name: Security
run: poetry run tox -e secure
- name: Test
run: poetry run tox