|
8 | 8 | branches: |
9 | 9 | - "*" |
10 | 10 |
|
| 11 | +env: |
| 12 | + # go needs absolute directories, using the $HOME variable doesn't work here. |
| 13 | + DOWNLOAD_CACHE: /home/runner/work/download_cache |
| 14 | + |
11 | 15 | jobs: |
12 | 16 | frontend: |
13 | 17 | name: frontend tests on ${{ matrix.os }} |
@@ -118,3 +122,54 @@ jobs: |
118 | 122 |
|
119 | 123 | - name: build backend binary |
120 | 124 | run: make build |
| 125 | + |
| 126 | + proto-compile-check: |
| 127 | + name: RPC proto compilation check |
| 128 | + runs-on: ubuntu-latest |
| 129 | + steps: |
| 130 | + - name: set git config |
| 131 | + run: | |
| 132 | + git config --global core.eol lf |
| 133 | + git config --global core.autocrlf false |
| 134 | +
|
| 135 | + - name: git checkout |
| 136 | + uses: actions/checkout@v2 |
| 137 | + |
| 138 | + - name: setup nodejs v${{ matrix.node_version }} |
| 139 | + uses: actions/setup-node@v1 |
| 140 | + with: |
| 141 | + node-version: 12.x |
| 142 | + |
| 143 | + - name: download cache |
| 144 | + uses: actions/cache@v1 |
| 145 | + with: |
| 146 | + path: /home/runner/work/download_cache |
| 147 | + key: lnd-${{ runner.os }}-download-${{ hashFiles('**/install_protoc.sh') }} |
| 148 | + restore-keys: | |
| 149 | + lnd-${{ runner.os }}-download-${{ hashFiles('**/install_protoc.sh') }} |
| 150 | + lnd-${{ runner.os }}-download- |
| 151 | +
|
| 152 | + - name: install protoc and protobuf libraries |
| 153 | + run: ./scripts/install_protoc.sh |
| 154 | + |
| 155 | + - name: get yarn cache dir |
| 156 | + id: yarn-cache-dir |
| 157 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 158 | + |
| 159 | + - name: yarn cache |
| 160 | + uses: actions/cache@v2 |
| 161 | + id: yarn-cache |
| 162 | + with: |
| 163 | + path: ${{ steps.yarn-cache-dir.outputs.dir }} |
| 164 | + key: ${{ runner.os }}-yarn-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }} |
| 165 | + restore-keys: | |
| 166 | + ${{ runner.os }}-yarn-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }} |
| 167 | + ${{ runner.os }}-yarn-${{ matrix.node_version }}- |
| 168 | + ${{ runner.os }}-yarn- |
| 169 | +
|
| 170 | + - name: install dependencies |
| 171 | + working-directory: ./app |
| 172 | + run: yarn |
| 173 | + |
| 174 | + - name: run check |
| 175 | + run: make protos-check |
0 commit comments