Skip to content

Commit

Permalink
build: setup monge user and drop sudos.
Browse files Browse the repository at this point in the history
  • Loading branch information
feanil committed Jan 19, 2024
1 parent 5a7c532 commit 579635a
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,27 @@ jobs:
--health-timeout 5s
--health-retries 3
steps:
- name: sync directory owner
run: sudo chown runner:runner -R .*
# - name: sync directory owner
# run: sudo chown runner:runner -R .*
- name: Setup mongodb user
run: |
mongosh edxapp --eval '
db.createUser(
{
user: "edxapp",
pwd: "password",
roles: [
{ role: "readWrite", db: "edxapp" },
]
}
);
'
- name: Verify mongo and mysql db credentials
run: |
mysql -h 127.0.0.1 -uedxapp001 -ppassword -e "select 1;" edxapp
mongosh --host 127.0.0.1 --username edxapp --password password --eval 'use edxapp; db.adminCommand("ping");' edxapp
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand All @@ -66,15 +85,15 @@ jobs:

- name: install requirements
run: |
sudo make test-requirements
make test-requirements
if [[ "${{ matrix.django-version }}" != "pinned" ]]; then
sudo pip install "django~=${{ matrix.django-version }}.0"
sudo pip check # fail if this test-reqs/Django combination is broken
pip install "django~=${{ matrix.django-version }}.0"
pip check # fail if this test-reqs/Django combination is broken
fi
- name: list installed package versions
run: |
sudo pip freeze
pip freeze
- name: Setup and run tests
uses: ./.github/actions/unit-tests
Expand Down

0 comments on commit 579635a

Please sign in to comment.