Skip to content

Commit ab687c0

Browse files
committed
chore(ci): Try another config
1 parent 657f146 commit ab687c0

File tree

2 files changed

+65
-57
lines changed

2 files changed

+65
-57
lines changed

.github/workflows/main.yaml

Lines changed: 64 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -26,69 +26,77 @@ env:
2626
ES_HOST_VOLUME: /opt/services/data/elasticsearch/data
2727

2828
jobs:
29-
build:
29+
test:
3030
runs-on: ubuntu-latest
3131
timeout-minutes: 10
3232
concurrency:
33-
group: ci-${{ github.ref }}
33+
group: ci-${{ github.event_name }}-${{ github.ref }}
3434
cancel-in-progress: true
3535

3636
defaults:
3737
run:
3838
shell: bash -l {0}
3939

4040
steps:
41-
- uses: actions/checkout@v3
42-
43-
- uses: mamba-org/setup-micromamba@v1
44-
with:
45-
miniconda-version: "latest"
46-
mamba-version: "*"
47-
environment-file: conda/base.yaml
48-
channels: conda-forge,nodefaults
49-
channel-priority: true
50-
activate-environment: es-journals
51-
use-mamba: true
52-
miniforge-variant: Mambaforge
53-
54-
- name: Set Environment Variable
55-
run: echo "GITHUB_PAT=${{ secrets.DEVTOOLS_PAT }}" >> $GITHUB_ENV
56-
57-
- name: Create environment variables files
58-
run: |
59-
envsubst < .env.tpl > .env
60-
61-
- name: Check if poetry.lock is updated
62-
run: poetry check
63-
64-
- name: Install dependencies
65-
run: poetry install --no-root
66-
67-
- name: Clean-up
68-
run: makim clean.tmp
69-
70-
- name: Setup development environment for Rxivs
71-
run: |
72-
for rxiv_name in biorxiv medrxiv; do
73-
makim develop.setup-dev-env --index-name $rxiv_name
74-
done
75-
76-
- name: Start Elasticsearch
77-
run: |
78-
sugar compose-ext start --options "-d"
79-
80-
- name: Fetch and process MedRxiv data
81-
run: |
82-
bash scripts/fetch_rxivx_data.sh medrxiv
83-
84-
# - name: Count documents in MedRxiv index
85-
# run: |
86-
# makim develop.count-docs-in-index --index-name medrxiv
87-
88-
89-
- name: Run tests
90-
run: makim tests.unittest
91-
92-
- name: Setup tmate session
93-
if: "${{ failure() }}"
94-
uses: mxschmitt/action-tmate@v3
41+
- uses: actions/checkout@v4
42+
43+
- name: Cache Conda Packages
44+
uses: actions/cache@v3
45+
with:
46+
path: ~/.conda/envs/es-journals
47+
key: ubuntu-latest-conda-${{ hashFiles('conda/base.yaml') }}
48+
restore-keys: |
49+
ubuntu-latest-conda-
50+
51+
- uses: conda-incubator/setup-miniconda@v3
52+
with:
53+
miniforge-version: latest
54+
environment-file: conda/base.yaml
55+
channels: conda-forge,nodefaults
56+
activate-environment: es-journals
57+
auto-update-conda: true
58+
conda-solver: libmamba
59+
60+
- name: Set Environment Variable
61+
run: echo "GITHUB_PAT=${{ secrets.DEVTOOLS_PAT }}" >> $GITHUB_ENV
62+
63+
- name: Create environment variables files
64+
run: |
65+
envsubst < .env.tpl > .env
66+
67+
- name: Check if poetry.lock is updated
68+
run: poetry check
69+
70+
- name: Install dependencies
71+
run: |
72+
poetry config virtualenvs.create false
73+
poetry install --no-root
74+
75+
- name: Clean-up
76+
run: makim clean.tmp
77+
78+
- name: Setup development environment for Rxivs
79+
run: |
80+
for rxiv_name in biorxiv medrxiv; do
81+
makim develop.setup-dev-env --index-name $rxiv_name
82+
done
83+
84+
- name: Start Elasticsearch
85+
run: |
86+
sugar compose-ext start --options "-d"
87+
88+
- name: Fetch and process MedRxiv data
89+
run: |
90+
bash scripts/fetch_rxivx_data.sh medrxiv
91+
92+
# - name: Count documents in MedRxiv index
93+
# run: |
94+
# makim develop.count-docs-in-index --index-name medrxiv
95+
96+
97+
- name: Run tests
98+
run: makim tests.unittest
99+
100+
- name: Setup tmate session
101+
if: "${{ failure() }}"
102+
uses: mxschmitt/action-tmate@v3

containers/compose.elasticsearch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ services:
1414
source: ${ES_HOST_VOLUME}
1515
target: /usr/share/elasticsearch/data
1616
ports:
17-
- "${ES_PORT}:9200"
17+
- "9200:9200"
1818
env_file: ../.env
1919
environment:
2020
- node.name=es01

0 commit comments

Comments
 (0)