Skip to content

Commit

Permalink
Merge pull request #616 from arunavabasu-03/workflow
Browse files Browse the repository at this point in the history
cache dependencies [actions]
  • Loading branch information
suzil authored Aug 2, 2022
2 parents 6a8372a + e97f22f commit e24b036
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml → .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: "14"
node-version: "16"
cache: "yarn"

- name: Install Node.js dependencies
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/lint&type.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

# linting check of radis-app
name: Linting Check for Radis-App
name: 🌱 CI

on:
push:
Expand All @@ -11,22 +10,23 @@ on:
- main

jobs:
run-linters:
name: Run linters
test:
name: 🧪 Test
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 14

node-version: 16
cache: 'yarn'
- name: Install Node.js dependencies
run: yarn install --frozen-lockfile

- name: Run linters
- name: Linting check
run: cd frontend && yarn lint
- name: type check
run: cd frontend && yarn type-check
- name: Type check
run: cd frontend && yarn type-check
- name: Run tests
run: cd frontend && yarn test
10 changes: 4 additions & 6 deletions frontend/src/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { render, screen } from "@testing-library/react";
/* eslint-disable @typescript-eslint/no-empty-function */
/* eslint-disable react/react-in-jsx-scope */
import { render } from "@testing-library/react";
import App from "./App";

test("renders learn react link", () => {
// eslint-disable-next-line react/react-in-jsx-scope
test("renders the page", () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});
1 change: 0 additions & 1 deletion frontend/src/components/CalcSpectrum.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ export const CalcSpectrum: React.FC = () => {
};
const databaseWatch = watch("database");
const modeWatch = watch("mode");

React.useEffect(() => {
if (databaseWatch === "geisa") {
setUseGesia(true);
Expand Down
1 change: 1 addition & 0 deletions frontend/src/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import "@testing-library/jest-dom";
window.URL.createObjectURL = () => "";

0 comments on commit e24b036

Please sign in to comment.