Fix/ PC console Paper Status: Don't show SAC name as a property in the query search modal if there are no SACs #8415
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
# This workflow will do a clean install, build the source code and run tests across different versions of node | |
# See: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Next.js CI | |
on: | |
pull_request: | |
branches: [master] | |
push: | |
branches: [master] | |
repository_dispatch: | |
types: [openreview-api-updated] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
NEXT_PORT: 3030 | |
SUPER_USER: openreview.net | |
services: | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- name: Start MongoDB | |
uses: supercharge/mongodb-github-action@1.10.0 | |
with: | |
mongodb-version: 6.0 | |
mongodb-replica-set: rs0 | |
- name: Configure sysctl Limits | |
run: | | |
sudo swapoff -a | |
sudo sysctl -w vm.swappiness=1 | |
sudo sysctl -w fs.file-max=262144 | |
sudo sysctl -w vm.max_map_count=262144 | |
- name: Start Elasticsearch | |
uses: elastic/elastic-github-actions/elasticsearch@master | |
with: | |
stack-version: 7.6.0 | |
- name: Checkout openreview-py | |
uses: actions/checkout@v4 | |
with: | |
repository: openreview/openreview-py | |
path: openreview-py | |
- name: Checkout openreview-api-v1 | |
uses: actions/checkout@v4 | |
with: | |
repository: openreview/openreview-api-v1 | |
token: ${{ secrets.OPENREVIEW_ACCESS_TOKEN }} | |
path: openreview-api-v1 | |
- name: Checkout openreview-api | |
uses: actions/checkout@v4 | |
with: | |
repository: openreview/openreview-api | |
token: ${{ secrets.OPENREVIEW_ACCESS_TOKEN }} | |
path: openreview-api | |
- name: Checkout openreview-web | |
uses: actions/checkout@v4 | |
with: | |
path: openreview-web | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: npm | |
cache-dependency-path: | | |
openreview-api/package-lock.json | |
openreview-web/package-lock.json | |
- name: Setup openreview-py | |
run: | | |
cd openreview-py | |
python -m pip install --upgrade pip | |
pip install -e . | |
- name: Setup openreview-api-v1 | |
run: | | |
cd openreview-api-v1 | |
mkdir -p logs files/attachments files/pdfs files/temp | |
npm ci | |
- name: Setup openreview-api | |
run: | | |
cd openreview-api | |
mkdir -p logs files/attachments files/pdfs files/temp | |
npm ci | |
- name: Cache openreview-web | |
id: openreview-web-cache | |
uses: actions/cache@v4 | |
with: | |
# For explanation see https://nextjs.org/docs/advanced-features/ci-build-caching#github-actions | |
path: openreview-web/.next/cache | |
key: ${{ runner.os }}-nextjs-${{ hashFiles('openreview-web/package-lock.json') }}-${{ hashFiles('openreview-web/**.js') }} | |
restore-keys: | | |
${{ runner.os }}-nextjs-${{ hashFiles('openreview-web/package-lock.json') }}- | |
- name: Setup openreview-web | |
run: | | |
cd openreview-web | |
npm ci | |
cp .env.example .env.local | |
NODE_ENV=production SUPER_USER=openreview.net npm run build | |
- name: Run Unit Tests | |
run: | | |
cd openreview-web | |
npm run unit-test | |
- name: Run openreview-api-v1 | |
run: | | |
cd openreview-api-v1 | |
NODE_ENV=circleci node scripts/clean_start_app.js & | |
- name: Run openreview-api | |
run: | | |
cd openreview-api | |
NODE_ENV=circleci node scripts/setup_app.js & | |
- name: Run openreview-web | |
run: | | |
cd openreview-web | |
NODE_ENV=production SUPER_USER=openreview.net npm run start & | |
- name: Run TestCafe Tests | |
run: | | |
cd openreview-web | |
xvfb-run --server-args="-screen 0 1280x720x24" npm run test | |
- name: Upload Test Videos | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: TestCafe Videos | |
path: openreview-web/videos/ | |
- name: Check API Logs | |
if: failure() | |
run: | | |
cd openreview-api/logs | |
cat "$(ls -rt | tail -n1)" | |
deploy: | |
# Allow the job to fetch a GitHub ID token | |
permissions: | |
id-token: write | |
contents: read | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Add SSH key | |
run: | | |
mkdir -p /home/runner/.ssh | |
echo "${{ secrets.GCLOUD_SSH_KEY }}" > /home/runner/.ssh/google_compute_engine | |
echo "${{ secrets.GCLOUD_SSH_KEY_PUB }}" > /home/runner/.ssh/google_compute_engine.pub | |
chmod 600 /home/runner/.ssh/google_compute_engine | |
chmod 600 /home/runner/.ssh/google_compute_engine.pub | |
- name: Authenticate with Google Cloud | |
id: auth | |
uses: google-github-actions/auth@v2 | |
with: | |
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} | |
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }} | |
create_credentials_file: true | |
cleanup_credentials: true | |
export_environment_variables: true | |
- name: Setup gcloud | |
uses: google-github-actions/setup-gcloud@v2 | |
with: | |
project_id: ${{ secrets.GCP_PROJECT_ID }} | |
skip_install: true | |
- name: Deploy to dev | |
run: | | |
gcloud compute ssh --zone "us-central1-b" openreview@dev-instance-1 --command 'export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && bash bin/deploy-web.sh' --quiet | |
gcloud compute ssh --zone "us-central1-b" openreview@dev-instance-1 --command 'export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && bash bin/deploy-openreview-py.sh' --quiet |