Skip to content

ci: test on Java 8 #378

ci: test on Java 8

ci: test on Java 8 #378

Workflow file for this run

name: Main
on:
pull_request:
push:
branches: [master]
jobs:
build:
strategy:
matrix:
os:
- ubuntu-20.04
- windows-2019
- macos-12
- macos-14
env:
CONAN_HOME: "${{ github.workspace }}/conan-cache"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # for commit linting and semantic-release
persist-credentials: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 21
cache: npm
env:
npm_config_workspaces: false
- uses: actions/setup-python@v5
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@v4
with:
path: .vscode-test
key: ${{ matrix.os }}-node-${{ hashFiles('**/package-lock.json') }}
- name: Cache .conan
uses: actions/cache@v4
with:
path: ${{ env.CONAN_HOME }}
key: ${{ matrix.os }}-conan-${{ hashFiles('packages/parquet-reader/conanfile.txt') }}
- name: Use Java 8
run: |
echo "JAVA_HOME=${JAVA_HOME_8_X64}" >> $GITHUB_ENV
echo "PATH=${JAVA_HOME_8_X64}/bin:${PATH}" >> $GITHUB_ENV
- run: npm ci --forward-scripts
- name: Static checks
run: |
npm run spellcheck
npm run lint
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
- run: xvfb-run -a npm test
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
env:
LOG_TO_CONSOLE: ${{ secrets.ACTIONS_STEP_DEBUG }}
- run: npm test
if: ${{ !startsWith(matrix.os, 'ubuntu-') }}
env:
LOG_TO_CONSOLE: ${{ secrets.ACTIONS_STEP_DEBUG }}
- name: Upload prebuilds
if: '!env.ACT'
uses: actions/upload-artifact@v4
with:
name: prebuilds-${{ matrix.os }}
path: packages/parquet-reader/prebuilds
retention-days: 1
release:
runs-on: ubuntu-latest
needs:
- build
env:
HUSKY: 0
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # for commit linting and semantic-release
persist-credentials: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 21
cache: npm
env:
npm_config_workspaces: false
- uses: actions/setup-python@v5
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@v4
with:
path: packages/parquet-reader/prebuilds
pattern: prebuilds-*
merge-multiple: true
- run: npm ci --forward-scripts
- 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'
run: npx vsce package
- name: Upload
if: github.ref != 'refs/heads/master' && !env.ACT
uses: actions/upload-artifact@v4
with:
name: vscode-package
path: parquet-viewer-*.vsix