Skip to content

Commit

Permalink
Merge pull request #171 from unt-libraries/add-github-actions
Browse files Browse the repository at this point in the history
Add GitHub Actions
  • Loading branch information
gracieflores authored Dec 7, 2022
2 parents 0f0a82d + 26323ca commit d751a0e
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 20 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Test coda

on: [push, pull_request, workflow_dispatch]

env:
PROJECT_NAME: coda

jobs:
container-job:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- name: Start the app
run: docker-compose up -d app
- name: Run the tests
run: docker-compose run --rm test --create-db
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Coda [![Build Status](https://travis-ci.org/unt-libraries/coda.svg?branch=master)](https://travis-ci.org/unt-libraries/coda)
# Coda [![Build Status](https://github.com/unt-libraries/coda/actions/workflow/test.yml/badge.svg?branch=master)](https://github.com/unt-libraries/coda/actions)


## Developing
Expand Down Expand Up @@ -59,6 +59,21 @@ $ docker-compose build
$ docker-compose up -d app
```

#### Developing with Podman and Podman-Compose

Similar to docker and docker-compose, you will need to install, clone the repository and create a `secrets.json`.

[Install or Enable Podman](https://podman.io/getting-started/installation).

[Install Podman Compose](https://github.com/containers/podman-compose).

If you have SELinux, you may need to temporarily add `:Z` to the base volumes in the docker-compose.yml. It will look like `.:/app/:Z`. You may also need to use `sudo` for your podman-compose commands.

The rest of the steps are also similar. You will want to replace the word `docker` with `podman`. You will need to add one step before migrating:
```sh
$ podman-compose up -d
```

## Running the tests

The db container must already be running, or the tests will probably
Expand All @@ -71,3 +86,8 @@ $ docker-compose run --rm test --create-db
# Subsequent runs
$ docker-compose run --rm test
```

For podman
```sh
$ podman-compose run --rm test
```
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ requests==2.20.0
pyoai==2.5.0
pytest==3.10.1
pytest-django>=3.4.1
flake8
flake8<5.0.0
pytest-flake8
factory_boy
sqlparse==0.3.0
Expand Down

0 comments on commit d751a0e

Please sign in to comment.