Merge pull request #38 from seeq12/task/jab/kernel_version #94
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 install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
buildDev: | |
name: Build & Test | Development | |
if: github.event_name == 'pull_request' | |
runs-on: ubuntu-latest | |
environment: development | |
env: | |
url: ${{ secrets.URL }} | |
username: ${{ secrets.USERNAME }} | |
password: ${{ secrets.PASSWORD }} | |
PR_NUMBER: ${{ github.event.number }} | |
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }} | |
ARTIFACTORY_BASE_URL: ${{ secrets.ARTIFACTORY_BASE_URL }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.8" | |
cache: 'pip' | |
cache-dependency-path: | | |
**/requirements*.txt | |
- name: Bootstrap Add-on | |
run: | | |
./ao bootstrap --url "$url" --username "$username" --password "$password" | |
- name: Deploy Add-on to Seeq Instance | |
run: | | |
./ao --suffix="$PR_NUMBER" deploy --clean | |
- name: Test Add-on | |
run: | | |
./ao --suffix="$PR_NUMBER" test | |
- name: Publish Add-on to Dev Repo | |
run: | | |
./ao --suffix="$PR_NUMBER" publish | |
buildProd: | |
name: Build & Test | Production | |
if: github.event_name == 'push' | |
runs-on: ubuntu-latest | |
environment: production | |
env: | |
url: ${{ secrets.URL }} | |
username: ${{ secrets.USERNAME }} | |
password: ${{ secrets.PASSWORD }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.8" | |
cache: 'pip' | |
cache-dependency-path: | | |
**/requirements*.txt | |
- name: Bootstrap Add-on | |
run: | | |
./ao bootstrap --url "$url" --username "$username" --password "$password" | |
- name: Deploy Add-on to Seeq Instance | |
run: | | |
./ao deploy --clean | |
- name: Test Add-on | |
run: | | |
./ao test | |
publishProd: | |
name: Publish | Production | |
needs: buildProd | |
runs-on: ubuntu-latest | |
environment: production | |
env: | |
url: ${{ secrets.URL }} | |
username: ${{ secrets.USERNAME }} | |
password: ${{ secrets.PASSWORD }} | |
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }} | |
ARTIFACTORY_BASE_URL: ${{ secrets.ARTIFACTORY_BASE_URL }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.8" | |
cache: 'pip' | |
cache-dependency-path: | | |
**/requirements*.txt | |
- name: Bootstrap Add-on | |
run: | | |
./ao bootstrap --url "$url" --username "$username" --password "$password" | |
- name: Distribute Add-on | |
run: | | |
./ao publish |