Skip to content

Commit

Permalink
Merge branch 'main' into remove-yt-config
Browse files Browse the repository at this point in the history
  • Loading branch information
naknomum authored Nov 25, 2024
2 parents 824db46 + 9c094d2 commit dd4fef6
Show file tree
Hide file tree
Showing 98 changed files with 6,444 additions and 3,791 deletions.
104 changes: 98 additions & 6 deletions .github/workflows/codecov-report.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,98 @@
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
name: CodCov, Run Backend and Frontend Tests

on:
push:
branches:
- '**'

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

# Set up Java for backend tests
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '8'

# Set up Node.js for frontend tests
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '16'

# Install dependencies for backend
- name: Install backend dependencies
run: |
#cd src/test
mvn clean install
mkdir -p src/surefire-reports
mkdir -p frontend/coverage
# Run backend tests with coverage
- name: Run backend tests
run: mvn test -e
working-directory: ./
continue-on-error: true

# Install dependencies for frontend
- name: Install frontend dependencies
run: |
cd frontend
npm install
# Run frontend tests with coverage
- name: Run frontend tests
run: npm run test --coverage
working-directory: frontend
continue-on-error: true

# Upload test results and coverage
- name: Upload coverage results
uses: actions/upload-artifact@v3
with:
name: test-results
path: |
target/surefire-reports
frontend/coverage
# List coverage files
- name: Verify coverage files
run: |
echo "Checking backend coverage files..."
ls -l target/site/jacoco/ || echo "No backend coverage files found"
echo "Checking frontend coverage files..."
ls -l frontend/coverage/ || echo "No frontend coverage files found"
# Upload to Codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # Add Codecov token as a secret in GitHub
files: |
target/site/jacoco/jacoco.xml
frontend/coverage/lcov.info
flags: backend,frontend
name: codecov-coverage-report
fail_ci_if_error: false # Does not block merge if there’s an error

- name: List files
run: |
#cd src/test
ls -l target/surefire-reports
ls -l frontend/coverage
# Display test coverage in the summary (optional)
- name: Display test coverage summary
run: |
echo "Backend Test Results:"
cat target/surefire-reports/*.txt || true
echo "Frontend Test Coverage Summary:"
cat frontend/coverage/*.* || true
10 changes: 2 additions & 8 deletions devops/deploy/.dockerfiles/tomcat/commonConfiguration.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@
#file system folder in which marked individual data will be stored (e.g. data files)
#markedIndividualDirectoryLocation=individuals

# default behaviors for Project object
loggedOutDefaultDesired = true
defaultProjectOrganizationParameter = IndoCet
defaultProjName = Indocet Opportunistic Sightings
defaultProjId = IndoCetOppS-

#file system folder in which adoption data will be stored (e.g. photos)
#adoptionLocation=adoptions

Expand All @@ -56,8 +50,8 @@ allowAdoptions = false

#email addresses and parameters
sendEmailNotifications=true
autoEmailAddress=info@wildbook.org
newSubmissionEmail=donotreply@wildbook.org
autoEmailAddress=info@wildme.org
newSubmissionEmail=donotreply@wildme.org
mailHost=localhost
removeEmailString=Do you want to REMOVE your email address from this database? Click the link below to remove it. You will no longer receive updates on your encounters.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@
#file system folder in which marked individual data will be stored (e.g. data files)
#markedIndividualDirectoryLocation=individuals

# default behaviors for Project object
loggedOutDefaultDesired = true
defaultProjectOrganizationParameter = IndoCet
defaultProjName = Indocet Opportunistic Sightings
defaultProjId = IndoCetOppS-

#file system folder in which adoption data will be stored (e.g. photos)
#adoptionLocation=adoptions

Expand Down
22 changes: 13 additions & 9 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,24 @@ export default [
pluginJs.configs.recommended,
pluginReactConfig,
{
files: ["**/*.{js,mjs,cjs,jsx}"],
files: ["**/*.{js,mjs,cjs,jsx}"],
plugins: {
"react-hooks": reactHooks,
"react-hooks": reactHooks,
},
languageOptions: {
globals: globals.browser,
globals: {
...globals.browser,
process: "readonly",
},
parser: babelParser,

},
settings: {
react: {
version: "detect"
}
},
},

rules: {
"semi": 2,
"react/prop-types": 0,
Expand Down Expand Up @@ -54,19 +58,19 @@ export default [
"no-param-reassign": 0,
"no-mixed-operators": 0,
"no-else-return": 0,

},
},
{
files: ['frontend/babel.config.js', 'frontend/jest.config.js', 'babel.config.js'], // Specify the config files
languageOptions: {
globals: {
require: "readonly",
require: "readonly",
module: "readonly",
__dirname: "readonly",
__dirname: "readonly",
process: "readonly",
},
},
},
},
{
files: ["**/__tests__/**/*.{js,jsx}", "**/*.test.{js,jsx}"],
Expand Down
Loading

0 comments on commit dd4fef6

Please sign in to comment.