-
Notifications
You must be signed in to change notification settings - Fork 2
Tests - setup + basic tests for all scripts #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 46 commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
7df5cd8
Test data - added test data
mickeyn 9256cd9
author - fix script
mickeyn 3f1e1fa
backpan - fix script
mickeyn 7364503
backup - fix script
mickeyn d335e49
check - fix script
mickeyn 2024cb7
checksum - fix script
mickeyn 8bfc512
contributor - fix script
mickeyn 176b28e
cover - fix script
mickeyn a76473e
cpan_testers - fix script
mickeyn 8f04dcd
cpan_testers_api - fix script
mickeyn 47ba547
cve - fix script
mickeyn 89e23f7
external - fix script
mickeyn 78e2ccc
favorite - fix script
mickeyn 9d95b5f
first - fix script
mickeyn 9ec9923
latest - fix script
mickeyn e0fa317
mirrors - fix script
mickeyn f48435d
package - fix script
mickeyn fbfd09e
permission - fix script
mickeyn 46c4630
purge - fix script
mickeyn b374eaf
release - fix script
mickeyn e95fba6
river - fix script
mickeyn 87b40ee
session - fix script
mickeyn a011f78
snapshot - fix script
mickeyn 406ef2b
suggest - fix script
mickeyn 8733aa3
tickets - fix script
mickeyn 280d49d
watcher - fix script
mickeyn 5594c0b
Added mapper logic - create full index + mapping
mickeyn 5cb6cbe
ES - support dev mode
mickeyn dceb9eb
a few more type removals and wrong node setting
mickeyn abb96cb
setup test - draft
mickeyn 4566b76
added ci config
mickeyn 7c5fd58
test
mickeyn eabc9f7
bring up the elasticsearch_test service
mickeyn 54e3174
tidy
mickeyn 4e27003
docker test run command
mickeyn e57c72d
Add docker-compose.yml
oalders ba720f5
Add README with status badge
oalders 48d1209
Add networks and volumes sections to compose file
oalders 58269c4
Don't die on missing find-ls.gz (for tests)
mickeyn dbec4ab
updated cpanfile
mickeyn a86bb47
Added test checks and optional find-ls.gz file input
mickeyn 6966688
tidy
mickeyn ae3144e
added find-ls.gz to test_data
mickeyn f0fb759
test env
mickeyn ed95ff7
Fixed contributor indexing + test
mickeyn 2ebb935
tidy
mickeyn 97d5b44
update CVE URLs
mickeyn 2e6623f
added CVE test data
mickeyn 8fd475b
River script - support json through file
mickeyn 835fec3
Added river test
mickeyn cce27c5
fix release indexing and CVE test
mickeyn eaab52a
Add river test data
mickeyn 5fa16e5
tidy
mickeyn 82eb9e2
fix favorite script
mickeyn d17d099
typo
mickeyn ae2ce77
Update wait-for-es.sh
mickeyn 39d05e4
Added index refreshing
mickeyn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| --- | ||
| # Use the latest 2.1 version of CircleCI pipeline process engine. See: | ||
| # https://circleci.com/docs/2.0/configuration-reference | ||
| version: 2.1 | ||
| orbs: | ||
| codecov: codecov/[email protected] | ||
| # Orchestrate or schedule a set of jobs | ||
| workflows: | ||
| docker-compose: | ||
| jobs: | ||
| - build-and-test | ||
| jobs: | ||
| build-and-test: | ||
| machine: true | ||
| resource_class: large | ||
| steps: | ||
| - run: | ||
| name: docker-compose version | ||
| command: docker-compose --version | ||
| - run: | ||
| command: | | ||
| git clone https://github.com/metacpan/metacpan-docker.git | ||
| cd metacpan-docker | ||
| name: metacpan-docker checkout | ||
| - checkout: | ||
| path: metacpan-docker/src/metacpan-ingest | ||
| - run: | ||
| command: | | ||
| pushd metacpan-docker | ||
| ./bin/metacpan-docker init | ||
| name: clone missing repositories | ||
| - run: | ||
| command: | | ||
| pushd metacpan-docker | ||
| docker-compose build --build-arg CPM_ARGS='--with-test' insgest_test | ||
| name: compose build | ||
| - run: | ||
| command: | | ||
| pushd metacpan-docker | ||
| ./bin/metacpan-docker init | ||
| #docker-compose --verbose up -d ingest_test | ||
| docker-compose --profile ingest-test up --build | ||
| name: compose up | ||
| - run: | ||
| command: | | ||
| pushd metacpan-docker | ||
| docker-compose exec -T ingest_test cpm install -g Devel::Cover | ||
| name: install Devel::Cover | ||
| # Since we're running docker-compose -d, we don't actually know if | ||
| # Elasticsearch is available at the time this build step begins. We | ||
| # probably need to wait for it here, so we'll add our own check. | ||
| - run: | ||
| command: | | ||
| pushd metacpan-docker | ||
| ./src/metacpan-ingest/wait-for-es.sh http://localhost:9200 elasticsearch_test | ||
| name: wait for ES | ||
| - run: | ||
| command: | | ||
| pushd metacpan-docker | ||
| docker build . -t metacpan/metacpan-ingest && docker compose run ingest env PLACK_ENV=dev HARNESS_PERL_SWITCHES="-MDevel::Cover=+ignore,^t/|^test-data/|^etc/" prove -lrv --jobs 4 t | ||
| # docker-compose exec -T ingest_test env PLACK_ENV=dev HARNESS_PERL_SWITCHES="-MDevel::Cover=+ignore,^t/|^test-data/|^etc/" prove -lr --jobs 4 t | ||
| name: run tests with coverage | ||
| # We are relying on environment variables from the host to be available when | ||
| # we publish the report, so we publish from the host rather than trying | ||
| # to propagate env variables to the container. | ||
| - run: | ||
| command: | | ||
| pushd metacpan-docker | ||
| docker-compose exec -T ingest_test cover -report json | ||
| name: create coverage report | ||
| - codecov/upload: | ||
| file: metacpan-docker/src/metacpan-ingest/cover_db/cover.json | ||
| - run: | ||
| command: | | ||
| pushd metacpan-docker | ||
| docker-compose logs | ||
| docker stats --no-stream | ||
| docker ps -a | head | ||
| name: docker-compose logs | ||
| when: on_fail | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| [](https://github.com/metacpan/metacpan-ingest/actions/workflows/build-container.yml) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.