Skip to content

Issue85

Issue85 #210

Workflow file for this run

name: Main
on:
pull_request:
push:
branches: [master]
jobs:
build:
strategy:
matrix:
os: [
macos-latest,
ubuntu-latest,
windows-latest,
]
env:
CONAN_HOME: "${{ github.workspace }}/conan-cache"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # for commit linting and semantic-release
persist-credentials: false
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pipenv'
- name: Install pipenv
run: |
curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- name: Cache .vscode-test
uses: actions/cache@v3
with:
path: packages/packet-viewer/.vscode-test
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache .conan
uses: actions/cache@v3
with:
path: ${{ env.CONAN_HOME }}
key: ${{ runner.os }}-conan-${{ hashFiles('packages/parquet-reader/conanfile.txt') }}
- run: npm ci
- name: Static checks
run: |
npm run spellcheck
npm run lint
if: matrix.os == 'ubuntu-latest'
- run: xvfb-run -a npm test
if: matrix.os == 'ubuntu-latest'
- run: npm test
if: matrix.os != 'ubuntu-latest'
- name: Upload prebuilds
if: '!env.ACT'
uses: actions/upload-artifact@v3
with:
name: prebuilds
path: packages/parquet-reader/prebuilds
retention-days: 1
release:
runs-on: ubuntu-latest
needs: build
env:
HUSKY: 0
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # for commit linting and semantic-release
persist-credentials: false
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pipenv'
- name: Install pipenv
run: |
curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- uses: actions/download-artifact@v3
with:
name: prebuilds
path: packages/parquet-reader/prebuilds
- run: npm ci
- name: Release
env:
GH_TOKEN: ${{ secrets.RELEASE_PAT }}
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: npx --no-workspaces semantic-release
- name: Package
if: github.ref != 'refs/heads/master'
uses: lannonbr/vsce-action@master
with:
args: "package"
- name: Upload
if: github.ref != 'refs/heads/master' && !env.ACT
uses: actions/upload-artifact@v3
with:
name: vscode-package
path: parquet-viewer-*.vsix