-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
215 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Backend build and push after merge of requirements.txt | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
types: | ||
- closed | ||
paths: | ||
- backend/requirements.txt | ||
- 'docker-compose.yaml' | ||
|
||
jobs: | ||
if_merged: | ||
name: Build and push backend image | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push Backend | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: backend/. | ||
push: true | ||
tags: ghcr.io/centrefordigitalhumanities/ianalyzer-backend:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# This workflow will build the backend container and then run tests; it will only be triggered when requirements change | ||
|
||
name: Build backend and run unit tests | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- 'feature/**' | ||
- 'bugfix/**' | ||
- 'hotfix/**' | ||
- 'dependabot/**' | ||
paths: | ||
- 'backend/requirements.txt' | ||
- 'docker-compose.yaml' | ||
|
||
jobs: | ||
backend-test: | ||
name: Test Backend | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run backend tests | ||
run: | | ||
sudo mkdir -p /ci-data | ||
docker compose --env-file .env-ci run --build backend pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Frontend build and push after merge of yarn.lock | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
types: | ||
- closed | ||
paths: | ||
- frontend/yarn.lock | ||
- 'docker-compose.yaml' | ||
|
||
jobs: | ||
if_merged: | ||
name: Build and push frontend image | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build frontend image, using cache from Github registry | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: frontend/. | ||
push: true | ||
tags: ghcr.io/centrefordigitalhumanities/ianalyzer-frontend:latest | ||
cache-from: type=registry,ref=ghcr.io/centrefordigitalhumanities/ianalyzer-frontend:latest | ||
cache-to: type=inline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# This workflow will build the frontend container and then run tests; it will only be triggered when yarn.lock changes | ||
|
||
name: Frontend unit tests | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- 'feature/**' | ||
- 'bugfix/**' | ||
- 'hotfix/**' | ||
- 'dependabot/**' | ||
paths: | ||
- frontend/yarn.lock | ||
- 'docker-compose.yaml' | ||
|
||
jobs: | ||
frontend-test: | ||
name: Test Frontend | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run frontend unit tests | ||
run: | | ||
docker compose --env-file .env-ci run --build frontend yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# This workflow will run every first of the month, to make sure we update the underlying images and libraries | ||
|
||
name: Scheduled build and push of all images | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 1 * *" | ||
|
||
jobs: | ||
rebuild-scheduled: | ||
name: Rebuild images | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build frontend image, using cache from Github registry | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: frontend/. | ||
push: true | ||
tags: ghcr.io/centrefordigitalhumanities/ianalyzer-frontend:latest | ||
cache-from: type=registry,ref=ghcr.io/centrefordigitalhumanities/ianalyzer-frontend:latest | ||
cache-to: type=inline | ||
- name: Build backend image, using cache from Github registry | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: backend/. | ||
push: true | ||
tags: ghcr.io/centrefordigitalhumanities/ianalyzer-backend:latest | ||
cache-from: type=registry,ref=ghcr.io/centrefordigitalhumanities/ianalyzer-backend:latest | ||
cache-to: type=inline | ||
- name: Build Elasticsearch image, using cache from Github registry | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
file: DockerfileElastic | ||
push: true | ||
tags: ghcr.io/centrefordigitalhumanities/ianalyzer-elasticsearch:latest | ||
cache-from: type=registry,ref=ghcr.io/centrefordigitalhumanities/ianalyzer-elasticsearch:latest | ||
cache-to: type=inline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.