Skip to content

Commit

Permalink
Add tests to Github Actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
yiquintero committed Nov 23, 2023
1 parent 8e4ecbd commit 9a53949
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 6 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/build-and-test-with-lammps-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,13 @@ jobs:
if ! [ -f lmp_mpi ]; then
echo "::error:: lammps binary does not exist"
exit 1
fi
fi
- name: Run Tests
run: |
cd octp/tests/
mkdir build
cd build
cmake .. -DTEST_IN_GITHUB_ACTIONS=ON
make
./testoctp
11 changes: 10 additions & 1 deletion .github/workflows/build-and-test-with-lammps-stable-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,13 @@ jobs:
if ! [ -f lmp_mpi ]; then
echo "::error:: lammps binary does not exist"
exit 1
fi
fi
- name: Run Tests
run: |
cd octp/tests/
mkdir build
cd build
cmake .. -DTEST_IN_GITHUB_ACTIONS=ON
make
./testoctp
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
################################################################################

# Testing data
tests/data/

# visual studio code settings
.vs*/

Expand Down
12 changes: 8 additions & 4 deletions tests/testoctp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,18 @@ class TestEnvironment : public ::testing::Environment {

};


TEST_F(OctpTest, DummyTest) {
std::cout << "dumdum1 " + lammpspath << std::endl << testdatapath << std::endl;
TEST_F(OctpTest, DummyTest0) {
//std::cout << "dumdum0 " + lammpspath << std::endl << testdatapath << std::endl;
EXPECT_TRUE(true);
}

TEST_F(OctpTest, DummyTest1) {
//std::cout << "dumdum1 " + lammpspath << std::endl << testdatapath << std::endl;
EXPECT_TRUE(false);
}

TEST_F(OctpTest, DummyTest2) {
std::cout << "dumdum2 " + lammpspath << std::endl << testdatapath << std::endl;
//std::cout << "dumdum2 " + lammpspath << std::endl << testdatapath << std::endl;
EXPECT_TRUE(true);
}

Expand Down

0 comments on commit 9a53949

Please sign in to comment.