Merge branch 'mauster' 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:
|
||||
push:
|
||||
@@ -21,11 +21,27 @@ jobs:
|
||||
uses: actions/checkout@main
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Use Node.js
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@main
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
- 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
|
||||
FROM node:16.9.1 as build
|
||||
COPY . .
|
||||
COPY .env.development .env
|
||||
|
||||
RUN npm install --silent
|
||||
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",
|
||||
"name": "Create React App Sample",
|
||||
"short_name": "Mau Mau",
|
||||
"name": "Mau Mau",
|
||||
"icons": [
|
||||
{
|
||||
"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