Skip to content

CI: Update to dpl v2 #261

CI: Update to dpl v2

CI: Update to dpl v2 #261

Workflow file for this run

name: CI
on: [ push, pull_request ]
jobs:
build:
name: Build, Upload, Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Cache Node modules
id: node-cache
uses: actions/cache@v3
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}
- name: Install Node modules
if: steps.node-cache.outputs.cache-hit != 'true'
run: npm ci
# Currently necessary for Webpack
env:
NODE_OPTIONS: --openssl-legacy-provider
- name: Build note-editor
run: npm run build
# Currently necessary for Webpack
env:
NODE_OPTIONS: --openssl-legacy-provider
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- name: Upload pre-build ZIP
if: |
env.ACT != 'true'
&& github.repository == 'zotero/note-editor'
&& github.event_name == 'push'
&& (github.ref == 'refs/heads/master' || endsWith(github.ref, '-hotfix') || github.ref == 'refs/heads/gh-actions-ci-test')
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
mkdir build/build-zip
cd build/zotero
zip -r ../build-zip/$GITHUB_SHA.zip *
cd ..
sudo gem install --no-document dpl -v '>= 2.0'
dpl s3 --bucket zotero-download --local_dir build-zip --upload_dir ci/client-note-editor --acl public_read
- name: Run tests
run: npm run test