Skip to content

Commit

Permalink
integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Oct 18, 2023
1 parent 6e9b2c9 commit f60d342
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .rultor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ release:
repo=yegor256/cam
sudo docker build --no-cache --tag "${repo}:${tag}" "$(pwd)"
mkdir /tmp/dataset
sudo docker run --rm -v /tmp/dataset:/dataset -e "REPO=yegor256/tojos" -e "TARGET=/dataset" "${repo}:${tag}" 'make env lint; make -e; make validate; make test'
sudo docker run --rm "${repo}:${tag}" 'make test'
cat ../docker-password | sudo docker login --password-stdin --username yegor256
sudo docker push "${repo}:${tag}"
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ zip: $(TARGET)/report.pdf
# Delete calculations.
clean:
set -e
set -x
rm -rf "$(TARGET)/report.pdf"
rm -rf "$(TARGET)/measurements"
rm -rf "$(TARGET)/data"
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ before sending us your pull request please run full build:
```bash
$ sudo make install
$ make test
$ make REPO=yegor256/tojos
```

This should take a few minutes to complete, without errors.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ runs:
args:
- '--login'
- '-c'
- 'export HOME=/cam; export REPO=yegor256/tojos; cd ${HOME}; . /root/.profile; make env lint && make -e && make -e validate && make test'
- 'export HOME=/cam; cd ${HOME}; . /root/.profile; make test'
35 changes: 35 additions & 0 deletions tests/steps/test-integration.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
# The MIT License (MIT)
#
# Copyright (c) 2021-2023 Yegor Bugayenko
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
set -e
set -o pipefail

stdout=$2

{
make clean "TARGET=${TARGET}"
make env
make lint
make "TARGET=${TARGET}" REPO=yegor256/tojos
make validate "TARGET=${TARGET}"
} > "${stdout}" 2>&1
echo "👍🏻 A full package processed correctly"

0 comments on commit f60d342

Please sign in to comment.