Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis Cleanup #378

Merged
merged 2 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
20 changes: 20 additions & 0 deletions .ci/docker.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.PHONY: ci_down ci_start ci_stop ci_test ci_up

ci_up: ## Create containers used to run tests on ci CI
docker-compose -f .ci/docker-compose-ci.yml up -d

ci_start: ## Start containers stopped by `ci_stop`
docker-compose -f .ci/docker-compose-ci.yml start

ci_test: ## Run tests on Docker containers, as on ci CI
docker exec -e TERM=$(TERM) -e TOXENV=$(TOXENV) -u root -it edx_notes_api /edx/app/edx_notes_api/edx_notes_api/.ci/run_tests.sh

ci_pii_check: ## Run pii annotations checker on Docker containers, as on ci CI
docker exec -e TERM=$(TERM) -e TOXENV=$(TOXENV) -u root -it edx_notes_api /edx/app/edx_notes_api/edx_notes_api/.ci/run_pii_checker.sh

ci_stop: ## Stop running containers created by `ci_up` without removing them
docker-compose -f .ci/docker-compose-ci.yml stop

ci_down: ## Stop and remove containers and other resources created by `ci_up`
docker-compose -f .ci/docker-compose-ci.yml down

File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ jobs:
- uses: actions/checkout@v2
- name: Start container
run: |
docker-compose -f .travis/docker-compose-travis.yml up -d
docker-compose -f .ci/docker-compose-ci.yml up -d
- name: Install Dependencies
run: |
docker exec -e TOXENV=${{ matrix.python-version }}-${{ matrix.django-version }} --env DB_HOST=${{ matrix.db-version }} -u root edx_notes_api \
/bin/bash -c "apt-get update && apt-get install python3-dev default-libmysqlclient-dev build-essential pkg-config"
- name: Run Tests
run: |
docker exec -e TOXENV=${{ matrix.python-version }}-${{ matrix.django-version }} --env DB_HOST=${{ matrix.db-version }} -u root edx_notes_api /edx/app/edx_notes_api/edx_notes_api/.travis/run_tests.sh
docker exec -e TOXENV=${{ matrix.python-version }}-${{ matrix.django-version }} --env DB_HOST=${{ matrix.db-version }} -u root edx_notes_api /edx/app/edx_notes_api/edx_notes_api/.ci/run_tests.sh
- name: Run PII Check
run: |
docker exec -e TOXENV=${{ matrix.python-version }}-${{ matrix.django-version }} -u root edx_notes_api /edx/app/edx_notes_api/edx_notes_api/.travis/run_pii_checker.sh
docker exec -e TOXENV=${{ matrix.python-version }}-${{ matrix.django-version }} -u root edx_notes_api /edx/app/edx_notes_api/edx_notes_api/.ci/run_pii_checker.sh
- name: Run Reserved Keywords Check
run: |
docker exec -e TOXENV=${{ matrix.python-version }}-${{ matrix.django-version }} -u root edx_notes_api /edx/app/edx_notes_api/edx_notes_api/.travis/run_check_keywords.sh
docker exec -e TOXENV=${{ matrix.python-version }}-${{ matrix.django-version }} -u root edx_notes_api /edx/app/edx_notes_api/edx_notes_api/.ci/run_check_keywords.sh
20 changes: 0 additions & 20 deletions .travis/docker.mk

This file was deleted.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ifdef TOXENV
TOX := tox -- #to isolate each tox environment if TOXENV is defined
endif

include .travis/docker.mk
include .ci/docker.mk

validate: test.requirements test

Expand Down Expand Up @@ -84,7 +84,7 @@ upgrade: piptools $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt fil
pip install -qr requirements/pip-tools.txt
pip-compile --upgrade -o requirements/base.txt requirements/base.in
pip-compile --upgrade -o requirements/test.txt requirements/test.in
pip-compile --upgrade -o requirements/travis.txt requirements/travis.in
pip-compile --upgrade -o requirements/ci.txt requirements/ci.in
# Let tox control the Django version for tests
grep -e "^django==" requirements/base.txt > requirements/django.txt
sed '/^[dD]jango==/d' requirements/test.txt > requirements/test.tmp
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ You can discuss this code on the `edx-code Google Group`__ or in the

__ https://groups.google.com/forum/#!forum/edx-code

.. |build-status| image:: https://travis-ci.com/edx/edx-notes-api.svg?branch=master
:target: https://travis-ci.com/edx/edx-notes-api
.. |build-status| image:: https://github.com/openedx/edx-notes-api/actions/workflows/ci.yml/badge.svg
:target: https://github.com/openedx/edx-notes-api/actions/workflows/ci.yml

2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ click==8.1.7
# via edx-django-utils
cryptography==41.0.7
# via pyjwt
django==4.2.8
django==4.2.9
# via
# -c requirements/constraints.txt
# -r requirements/base.in
Expand Down
2 changes: 1 addition & 1 deletion requirements/travis.in → requirements/ci.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Requirements for running tests in Travis
# Requirements for running tests in CI

-c constraints.txt

Expand Down
2 changes: 1 addition & 1 deletion requirements/travis.txt → requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ tomli==2.0.1
# pyproject-api
# tox
tox==4.11.4
# via -r requirements/travis.in
# via -r requirements/ci.in
virtualenv==20.25.0
# via tox
2 changes: 1 addition & 1 deletion requirements/django.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
django==4.2.8
django==4.2.9
Loading