-
Notifications
You must be signed in to change notification settings - Fork 472
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ross/dev-requirements
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 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,34 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Pre-build image and run make in dev container | ||
uses: devcontainers/ci@v0.3 | ||
with: | ||
imageName: ghcr.io/azure-samples/chat-with-your-data-solution-accelerator | ||
cacheFrom: ghcr.io/azure-samples/chat-with-your-data-solution-accelerator | ||
runCmd: make ci | ||
refFilterForPush: refs/heads/main |
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,27 @@ | ||
SHELL := /bin/bash | ||
|
||
.PHONY: help | ||
.DEFAULT_GOAL := help | ||
|
||
ENV_FILE := .env | ||
ifeq ($(filter $(MAKECMDGOALS),config clean),) | ||
ifneq ($(strip $(wildcard $(ENV_FILE))),) | ||
ifneq ($(MAKECMDGOALS),config) | ||
include $(ENV_FILE) | ||
export | ||
endif | ||
endif | ||
endif | ||
|
||
help: ## 💬 This help message :) | ||
@grep -E '[a-zA-Z_-]+:.*?## .*$$' $(firstword $(MAKEFILE_LIST)) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-23s\033[0m %s\n", $$1, $$2}' | ||
|
||
ci: unittest build-frontend ## 🚀 Continuous Integration (called by Github Actions) | ||
|
||
unittest: ## 🧪 Run the unit tests | ||
@echo -e "\e[34m$@\e[0m" || true | ||
@python -m pytest -m "not azure" | ||
|
||
build-frontend: ## 🏗️ Build the Frontend webapp | ||
@echo -e "\e[34m$@\e[0m" || true | ||
@cd code/app/frontend && npm install && npm run build |