Skip to content

Commit

Permalink
refactor: rename legacy travis naming convention to git actions ci
Browse files Browse the repository at this point in the history
  • Loading branch information
farhan committed Dec 15, 2023
1 parent 80d33c8 commit 891b455
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 29 deletions.
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/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
File renamed without changes.

0 comments on commit 891b455

Please sign in to comment.