Skip to content

Commit 3b532e0

Browse files
authored
Merge pull request #1 from allenai/AndKaminer-main
Use a separate Github Action to build the JAR.
2 parents 2519a92 + fbdce7f commit 3b532e0

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

.github/workflows/tests.yaml

+33-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,24 @@ on:
55
- pull_request
66

77
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- uses: olafurpg/setup-scala@v10
14+
15+
- name: Compile ScienceWorld's JAR
16+
run: ./simulator/package.sh
17+
18+
- uses: actions/upload-artifact@v4
19+
with:
20+
name: scienceworld.jar
21+
path: scienceworld/scienceworld.jar
22+
if-no-files-found: error
23+
824
test:
25+
needs: build
926
runs-on: ${{ matrix.os }}
1027
strategy:
1128
fail-fast: false
@@ -20,16 +37,29 @@ jobs:
2037
git config --global core.eol lf
2138
2239
- uses: actions/checkout@v4
40+
2341
- name: Set up Python ${{ matrix.python-version }}
2442
uses: actions/setup-python@v5
2543
with:
2644
python-version: ${{ matrix.python-version }}
45+
46+
- name: Remove old scienceworld.jar
47+
run: python -c "import os; os.remove(os.path.join('scienceworld', 'scienceworld.jar'))"
48+
49+
- name: Download scienceworld.jar
50+
uses: actions/download-artifact@v4
51+
with:
52+
name: scienceworld.jar
53+
path: scienceworld/
54+
2755
- name: Install dependencies
2856
run:
2957
python -m pip install --upgrade pip
3058
pip install tox tox-gh-actions
59+
60+
- name: Install ScienceWorld
61+
run:
62+
pip install -e .
63+
3164
- name: Test with tox
3265
run: tox
33-
- uses: olafurpg/setup-scala@v10
34-
- name: Check scienceworld compilation
35-
run: ./simulator/package.sh

0 commit comments

Comments
 (0)