fix: import arrow dynamically to avoid failed loading #192
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Main | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ | |
macos-latest, | |
ubuntu-latest, | |
windows-latest, | |
] | |
env: | |
CONAN_USER_HOME: "${{ github.workspace }}/conan-cache" | |
CONAN_USER_HOME_SHORT: "${{ github.workspace }}/conan-cache/short" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # for commit linting and semantic-release | |
persist-credentials: false | |
- if: ${{ env.ACT }} | |
name: Hack container for local development | |
run: | | |
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: npm | |
- 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_USER_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 | |
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: 16 | |
cache: npm | |
- 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 | |
- run: npm ci | |
- uses: actions/download-artifact@v3 | |
with: | |
name: prebuilds | |
path: packages/parquet-reader/prebuilds | |
- name: Release | |
env: | |
GH_TOKEN: ${{ secrets.RELEASE_PAT }} | |
VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
OVSX_PAT: ${{ secrets.OVSX_PAT }} | |
run: npx 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 |