Merge remote-tracking branch 'origin/developmaunt' into developmaunt
This commit is contained in:
@@ -1 +0,0 @@
|
|||||||
REACT_APP_API_URL="localhost:80"
|
|
||||||
22
.github/workflows/main.yml
vendored
22
.github/workflows/main.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Build & Test
|
name: Build Mau & Deploy Mau
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -21,11 +21,27 @@ jobs:
|
|||||||
uses: actions/checkout@main
|
uses: actions/checkout@main
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Use Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@main
|
uses: actions/setup-node@main
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: Build
|
- name: Build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
- name: Test
|
||||||
|
run: npm test -- --watch=false
|
||||||
|
deploy:
|
||||||
|
runs-on: self-hosted
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@main
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Create .env File
|
||||||
|
run: |
|
||||||
|
touch .env
|
||||||
|
echo "REACT_APP_API_URL=86.81.166.51:80" > .env
|
||||||
|
- name: Docker Compose
|
||||||
|
run: docker compose up -d --build
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
# Create a production build of the app
|
# Create a production build of the app
|
||||||
FROM node:16.9.1 as build
|
FROM node:16.9.1 as build
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY .env.development .env
|
|
||||||
|
|
||||||
RUN npm install --silent
|
RUN npm install --silent
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 26 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 88 KiB |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"short_name": "React App",
|
"short_name": "Mau Mau",
|
||||||
"name": "Create React App Sample",
|
"name": "Mau Mau",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "favicon.ico",
|
"src": "favicon.ico",
|
||||||
|
|||||||
9
src/App.test.tsx
Normal file
9
src/App.test.tsx
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { render, screen } from '@testing-library/react';
|
||||||
|
import App from './App';
|
||||||
|
|
||||||
|
test('Home screen contains \'MauMau\'', () => {
|
||||||
|
render(<App />);
|
||||||
|
const linkElement = screen.getByText(/MauMau/i);
|
||||||
|
expect(linkElement).toBeInTheDocument();
|
||||||
|
});
|
||||||
5
src/setupTests.ts
Normal file
5
src/setupTests.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
||||||
|
// allows you to do things like:
|
||||||
|
// expect(element).toHaveTextContent(/react/i)
|
||||||
|
// learn more: https://github.com/testing-library/jest-dom
|
||||||
|
import '@testing-library/jest-dom';
|
||||||
Reference in New Issue
Block a user