Skip to content

Commit

Permalink
Update client and python CI
Browse files Browse the repository at this point in the history
Closes #30: uses deploy-pages to deploy client build.
Add 3.9 and 3.10 python versions for testing the application in
python CI.

Signed-off-by: Pradyumna Krishna <[email protected]>
  • Loading branch information
PradyumnaKrishna committed May 31, 2023
1 parent b923f2e commit 14c16cb
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 26 deletions.
48 changes: 31 additions & 17 deletions .github/workflows/client_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,19 @@ on:
paths:
- client/**

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
release:
build:
defaults:
run:
working-directory: client
Expand All @@ -17,26 +28,29 @@ jobs:
VUE_APP_APIURL: ${{ secrets.VUE_APP_APIURL }}
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache Dependencies
uses: actions/cache@v2
uses: actions/setup-node@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
node-version: '16'
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
- name: Release
uses: peaceiris/actions-gh-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./client/dist
cname: protocol.onpy.in
force_orphan: true
path: ./dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
19 changes: 11 additions & 8 deletions .github/workflows/python_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
language: ["python"]
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -56,13 +56,16 @@ jobs:
run:
working-directory: server/python
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
Expand Down Expand Up @@ -93,7 +96,7 @@ jobs:
run: echo "DATE=$(date '+%Y-%m-%d')" >> $GITHUB_ENV

- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
Expand Down
2 changes: 1 addition & 1 deletion server/python/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-r requirements.txt

black==21.12b0
black==23.3.0
pytest==6.2.5
pylint==2.12.2

0 comments on commit 14c16cb

Please sign in to comment.