Skip to content

Commit

Permalink
Update GitHub Action workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
vabarbosa committed Nov 17, 2020
1 parent 7b29738 commit 10b33e6
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: qiskit.org CI
name: qiskit.org - build and deploy

on:
workflow_dispatch:
pull_request:
push:
branches: [ master ]
schedule:
# schedule daily at 08:00am UTC
# schedule daily at 08:00am UTC (on the default or base branch)
- cron: '0 8 * * *'

env:
Expand All @@ -21,34 +20,6 @@ env:
encrypted_rclone_key: ${{ secrets.encrypted_rclone_key }}

jobs:
lint-tests-and-build:
name: Lint, Tests, and Build
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x]

if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v2
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run lint
- run: npm test
- run: npm run generate

build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
Expand All @@ -57,7 +28,6 @@ jobs:
matrix:
node-version: [12.x, 14.x]

if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
steps:
- uses: actions/checkout@v2
- name: Set up Node ${{ matrix.node-version }}
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/test.workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: qiskit.org - lint, test, and build

on: [workflow_dispatch, pull_request]

env:
AIRTABLE_API_KEY: ${{ secrets.AIRTABLE_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IBM_CLOUD_API_KEY: ${{ secrets.IBM_CLOUD_API_KEY }}
IBM_CLOUD_ORGANIZATION: ${{ secrets.IBM_CLOUD_ORGANIZATION }}
IBM_CLOUD_SPACE: ${{ secrets.IBM_CLOUD_SPACE }}
QISKIT_SEGMENT_APP_KEY: ${{ secrets.QISKIT_SEGMENT_APP_KEY }}
QISKIT_SEGMENT_SCRIPT: ${{ secrets.QISKIT_SEGMENT_SCRIPT }}
encrypted_rclone_iv: ${{ secrets.encrypted_rclone_iv }}
encrypted_rclone_key: ${{ secrets.encrypted_rclone_key }}

jobs:
lint-test-and-build:
name: Lint, Test, and Build
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run lint
- run: npm test
- run: npm run generate

0 comments on commit 10b33e6

Please sign in to comment.