mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
4800889442
* fixed checks * updated sushi incentive comments * fixed index.ts errors * removed yarn.lock since it is not used anywhere, updated gh actions config and package-lock.json Co-authored-by: Ishan Jain <contact@ishanjain.me> Co-authored-by: Prayuman Verma <pradyumnverma27@gmail.com>
48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
name: PR status checks
|
|
on:
|
|
pull_request_target:
|
|
types: [assigned, opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
strategy:
|
|
matrix:
|
|
node-version: [16.x]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- name: Use Cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
node_modules
|
|
*/*/node_modules
|
|
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('**/package-lock.json') }}
|
|
- name: Install and build
|
|
run: |
|
|
npm install
|
|
- name: Run status checks
|
|
id: status_check
|
|
run: |
|
|
# Run status checks, Remove ANSI colors from the text
|
|
output=$(npx ts-node ./status-checks/index.ts | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g')
|
|
# Escape newlines so _all_ the output is included in the set-output
|
|
output="${output//'%'/'%25'}"
|
|
output="${output//$'\n'/'%0A'}"
|
|
output="${output//$'\r'/'%0D'}"
|
|
cat <<< "$output" > "./pr/status-check-output"
|
|
echo ${{ github.event.number }} > ./pr/number
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: pr
|
|
path: pr/
|
|
retention-days: 1
|