Skip to content

Commit

Permalink
Merge branch 'develop' into gsoc-table
Browse files Browse the repository at this point in the history
  • Loading branch information
BabyElias authored Aug 27, 2024
2 parents f6dc5e0 + cc81ca2 commit aecc6f1
Show file tree
Hide file tree
Showing 756 changed files with 59,564 additions and 44,252 deletions.
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@

## Reviewer checklist

- Automated test coverage is satisfactory
- PR is fully functional
- PR has been tested for [accessibility regressions](http://kolibri-dev.readthedocs.io/en/develop/manual_testing.html#accessibility-a11y-testing)
- External dependency files were updated if necessary (`yarn` and `pip`)
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/c_extensions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ jobs:
make staticdeps-cext
pip install .
# Start and stop kolibri
coverage run -p kolibri start --port=8081
coverage run -p kolibri stop
kolibri start --port=8081
kolibri stop
# Run just tests in test/
py.test --cov=kolibri --cov-report= --cov-append --color=no test/
py.test --color=no test/
no_c_ext:
name: No C Extensions
needs: pre_job
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
make staticdeps
pip install .
# Start and stop kolibri
coverage run -p kolibri start --port=8081
coverage run -p kolibri stop
kolibri start --port=8081
kolibri stop
# Run just tests in test/
py.test --cov=kolibri --cov-report= --cov-append --color=no test/
py.test --color=no test/
2 changes: 1 addition & 1 deletion .github/workflows/morango_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
INTEGRATION_TEST: 'true'
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11']
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11', '3.12']

steps:
- name: Checkout repository
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr_build_kolibri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
apk:
name: Build APK file
needs: whl
uses: learningequality/kolibri-installer-android/.github/workflows/[email protected].3
uses: learningequality/kolibri-installer-android/.github/workflows/[email protected].4
with:
tar-file-name: ${{ needs.whl.outputs.tar-file-name }}
ref: v0.1.3
ref: v0.1.4
69 changes: 62 additions & 7 deletions .github/workflows/release_kolibri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ on:
types: [published]

jobs:
latest_release:
name: Check if this release is the latest release
runs-on: ubuntu-latest
outputs:
is_latest_release: ${{ steps.is_latest_release.outputs.result }}
steps:
- name: Check if the current release is the latest Kolibri release
id: is_latest_release
uses: actions/github-script@v7
with:
result-encoding: string
script: |
const { data: latestRelease } = await github.rest.repos.getLatestRelease({
owner: 'learningequality',
repo: 'kolibri',
});
return latestRelease.tag_name === '${{ github.event.release.tag_name }}';
whl:
name: Build WHL file
uses: ./.github/workflows/build_whl.yml
Expand Down Expand Up @@ -99,11 +118,11 @@ jobs:
apk:
name: Build Android APK
needs: whl
uses: learningequality/kolibri-installer-android/.github/workflows/[email protected].3
uses: learningequality/kolibri-installer-android/.github/workflows/[email protected].4
with:
tar-file-name: ${{ needs.whl.outputs.tar-file-name }}
release: true
ref: v0.1.3
ref: v0.1.4
secrets:
KOLIBRI_ANDROID_APP_PRODUCTION_KEYSTORE: ${{ secrets.KOLIBRI_ANDROID_APP_PRODUCTION_KEYSTORE }}
KOLIBRI_ANDROID_APP_PRODUCTION_KEYSTORE_PASSWORD: ${{ secrets.KOLIBRI_ANDROID_APP_PRODUCTION_KEYSTORE_PASSWORD }}
Expand Down Expand Up @@ -160,13 +179,49 @@ jobs:
with:
path: 'dist/${{ matrix.filename }}'
destination: '${{ secrets.KOLIBRI_PUBLIC_RELEASE_GCS_BUCKET }}/downloads/kolibri/${{ github.event.release.name }}'
bck_prerelease_gcs_upload:
name: Upload WHL file to Google Cloud Storage for BCK Pre-release
runs-on: ubuntu-latest
needs: [whl]
steps:
- name: Download WHL artifact
uses: actions/download-artifact@v4
with:
name: ${{ needs.whl.outputs.whl-file-name }}
path: dist
- name: Zip whl file
run: zip -j dist/kolibri.zip dist/${{ needs.whl.outputs.whl-file-name }}
- uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GH_UPLOADER_GCP_SA_CREDENTIALS }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
- name: Upload to BCK bucket
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: 'dist/kolibri.zip'
destination: '${{ secrets.BCK_PRERELEASE_BUILD_ARTIFACT_GCS_BUCKET }}'
parent: false
- name: Unzip content static files from whl file
run: |
unzip dist/${{ needs.whl.outputs.whl-file-name }} 'kolibri/core/content/static/*' -d static
mv static/kolibri/core/content/static/** static
rm -rf static/kolibri
rm static/**/*.file_size
# Ungzip all .gz files in the static folder
for f in static/**/*.gz; do gunzip -f $f; done
- name: Upload content static files to BCK bucket
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: 'static'
destination: '${{ secrets.STUDIO_BCK_CONTENT_STATIC_BUCKET }}'
block_release_step:
# This step ties to the release environment which requires manual approval
# before it can execute. Once manual approval has been granted, the release is
# unblocked and all the subsequent steps in this workflow will happen.
name: Job to block publish of a release until it has been manually approved
if: ${{ !github.event.release.prerelease }}
needs: [whl, pex, dmg, deb, exe, test_pypi_upload]
needs: [whl, pex, dmg, deb, exe, zip, apk, test_pypi_upload]
runs-on: ubuntu-latest
environment: release
steps:
Expand All @@ -187,9 +242,9 @@ jobs:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
bck_gcs_upload:
name: Upload WHL file to Google Cloud Storage for BCK
if: ${{ !github.event.release.prerelease && github.event.release.name == 'latest'}}
needs: [block_release_step, whl, latest_release]
if: ${{ !github.event.release.prerelease && needs.latest_release.outputs.is_latest_release == 'true' }}
runs-on: ubuntu-latest
needs: [block_release_step, whl]
steps:
- name: Download WHL artifact
uses: actions/download-artifact@v4
Expand All @@ -213,9 +268,9 @@ jobs:
name: Release Android App
if: ${{ !github.event.release.prerelease }}
needs: [apk, block_release_step]
uses: learningequality/kolibri-installer-android/.github/workflows/[email protected].3
uses: learningequality/kolibri-installer-android/.github/workflows/[email protected].4
with:
version-code: ${{ needs.apk.outputs.version-code }}
ref: v0.1.3
ref: v0.1.4
secrets:
KOLIBRI_ANDROID_PLAY_STORE_API_SERVICE_ACCOUNT_JSON: ${{ secrets.KOLIBRI_ANDROID_PLAY_STORE_API_SERVICE_ACCOUNT_JSON }}
2 changes: 1 addition & 1 deletion .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
max-parallel: 5
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11']
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4
Expand Down
Loading

0 comments on commit aecc6f1

Please sign in to comment.