Skip to content

Commit

Permalink
Fix merge conflicts on requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
bjester committed Mar 12, 2024
2 parents 4376391 + 91dfec0 commit c999814
Show file tree
Hide file tree
Showing 75 changed files with 978 additions and 425 deletions.
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ updates:
directory: "/"
schedule:
interval: "weekly"
day: "friday"
day: "wednesday"
time: "00:00"

# Maintain dependencies for Javascript
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "friday"
day: "wednesday"
time: "00:00"
groups:
babel:
Expand All @@ -28,7 +28,7 @@ updates:
directory: "/"
schedule:
interval: "weekly"
day: "friday"
day: "wednesday"
time: "00:00"
groups:
github:
Expand Down
46 changes: 42 additions & 4 deletions .github/workflows/containerbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
pull_request:

jobs:
pre_job:
name: Path match check
pre_postgres:
name: Path match check - postgres
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
Expand All @@ -24,10 +24,11 @@ jobs:
skip_after_successful_duplicate: false
github_token: ${{ github.token }}
paths: '["docker/Dockerfile.postgres.dev", ".github/workflows/containerbuild.yml"]'

build_and_push_postgres:
name: Postgres - build and push Docker image to GitHub Container Registry
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
needs: pre_postgres
if: ${{ needs.pre_postgres.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
Expand Down Expand Up @@ -65,3 +66,40 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}

pre_nginx:
name: Path match check - nginx
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
skip_after_successful_duplicate: false
github_token: ${{ github.token }}
paths: '["k8s/images/nginx/*", ".github/workflows/containerbuild.yml"]'

build_nginx:
name: nginx - test build of nginx Docker image
needs: pre_nginx
if: ${{ needs.pre_nginx.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: ./
file: ./k8s/images/nginx/Dockerfile
platforms: linux/amd64
push: false
10 changes: 5 additions & 5 deletions .github/workflows/deploytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
node-version: '16.x'
- name: Cache Node.js modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -52,12 +52,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: '3.10'
- name: pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pyprod-${{ hashFiles('requirements.txt') }}
Expand All @@ -73,7 +73,7 @@ jobs:
with:
node-version: '16.x'
- name: Cache Node.js modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontendlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
node-version: '16.x'
- name: Cache Node.js modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontendtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
node-version: '16.x'
- name: Cache Node.js modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/notify_team_new_comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Send a slack notification when a contributor comments on issue

on:
issue_comment:
types: [created]

jobs:
contributor_issue_comment:
name: Contributor issue comment

if: >-
${{
!github.event.issue.pull_request &&
github.event.comment.author_association != 'MEMBER' &&
github.event.comment.author_association != 'OWNER'
}}
runs-on: ubuntu-latest
steps:
- name: Escape title double quotes
id: escape_title
run: |
title='${{ github.event.issue.title }}'
echo "ISSUE_TITLE=${title//\"/\\\"}" >> "$GITHUB_OUTPUT"
- name: Send message to Slack channel
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
uses: slackapi/[email protected]
with:
payload: |
{
"text": "*[Studio] New comment on issue: <${{ github.event.issue.html_url }}#issuecomment-${{ github.event.comment.id }}|${{ steps.escape_title.outputs.ISSUE_TITLE }} by ${{ github.event.comment.user.login }}>*"
}
6 changes: 3 additions & 3 deletions .github/workflows/pythontest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ jobs:
-v /tmp/minio_data:/data \
-v /tmp/minio_config:/root/.minio \
minio/minio server /data
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: '3.10'
- name: pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pytest-${{ hashFiles('requirements.txt', 'requirements-dev.txt') }}
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ dummyusers:
hascaptions:
python contentcuration/manage.py set_orm_based_has_captions

export COMPOSE_PROJECT_NAME=studio_$(shell git rev-parse --abbrev-ref HEAD)
BRANCH_NAME := $(shell git rev-parse --abbrev-ref HEAD | sed 's/[^a-zA-Z0-9_-]/-/g')

export COMPOSE_PROJECT_NAME=studio_$(BRANCH_NAME)

purge-postgres: .docker/pgpass
-PGPASSFILE=.docker/pgpass dropdb -U learningequality "kolibri-studio" --port 5432 -h localhost
Expand Down
40 changes: 0 additions & 40 deletions bin/run_minio.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export const tableMixin = {
...this.$route.query,
};
if (params.sortBy) {
params.ordering = (params.descending ? '-' : '') + params.sortBy;
params.ordering = (String(params.descending) === 'true' ? '-' : '') + params.sortBy;
delete params.sortBy;
delete params.descending;
}
Expand Down
Loading

0 comments on commit c999814

Please sign in to comment.