trying withouot /Users/alexcassell/Desktop/CLMS/LING600/matrix #48
This file contains 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 workflow will install Python dependencies and run tests with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python test | |
on: [push] | |
# pull_request: | |
# branches: [ "trunk" ] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
# Set up Python environment (with virtualenv) | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' # or whatever version you're using | |
# Create a virtual environment (optional but recommended) | |
- name: Create virtual environment | |
run: | | |
python -m venv venv | |
source venv/bin/activate | |
# Install dependencies (including delphin and ace) | |
- name: Install Delphin | |
run: | | |
source venv/bin/activate | |
pip install --upgrade pip | |
pip install pydelphin==1.4.0 # This will install both delphin and ace | |
# Ensure that ace can be imported from Python | |
- name: Test Python import | |
run: | | |
source venv/bin/activate | |
python -m pip show pydelphin | |
python -m pip freeze | |
python -c "from delphin import ace; print('ace imported successfully')" | |
ls venv/bin | |
python -c "from delphin import ace; print(ace.__file__)" | |
which ace || echo "ace not found in PATH" | |
ace --help || echo "Unable to run ace as executable" | |
echo "$PWD/venv/bin" | |
echo $GITHUB_PATH | |
export GITHUB_PATH=$GITHUB_PATH:$PWD/venv/bin | |
export PATH=$PATH:$PWD/venv/bin | |
echo $GITHUB_PATH | |
which ace || echo "still not found" | |
- name: Attempting ace curl | |
run: | | |
source venv/bin/activate | |
TAR_URL="https://sweaglesw.org/linguistics/ace/download/ace-0.9.34-x86-64.tar.gz" | |
curl -L $TAR_URL -o /tmp/file.tar.gz | |
mkdir -p /tmp/extracted | |
tar -xzvf /tmp/file.tar.gz -C /tmp/extracted | |
ls /tmp/extracted | |
chmod +x /tmp/extracted/ace-0.9.34/ace | |
echo "made it past chmod" | |
ls -R /tmp/extracted | |
echo "now ls -R inner folder" | |
ls -R /tmp/extracted/ace-0.9.34 | |
echo "seeing if symlink" | |
file /tmp/extracted/ace-0.9.34/ace | |
echo "last check" | |
ls -l /tmp/extracted/ace-0.9.34 | |
echo "about to mv" | |
sudo mv /tmp/extracted/ace-0.9.34/ace /venv/bin/ace | |
which ace || "first try didn't work" | |
sudo mv /tmp/extracted/ace-0.9.34/ace venv/bin/ace | |
which ace || "second try didn't work" | |
echo "THIS IS THE BIN INCOMING" | |
ls venv/bin | |
export GITHUB_PATH=$GITHUB_PATH:$PWD/venv/bin | |
export PATH=$PATH:$PWD/venv/bin | |
echo "github path====" | |
echo $GITHUB_PATH | |
echo "path====" | |
echo $PATH | |
which ace || "STILL NOT FOUND" | |
# Run your tests that use ace | |
- name: Test | |
id: run-tests | |
run: | | |
source venv/bin/activate | |
python3 rtest.py wh-* | |
continue-on-error: true | |
- name: Upload test logs as artifact | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-logs | |
path: /home/runner/work/matrix/matrix/tests/regression/logs/* | |
- name: Fail the job if the tests failed | |
if: always() | |
run: | | |
if [ ${{ steps.run-tests.outcome }} != 'success' ]; then | |
echo "Tests failed. Check logs for details." | |
exit 1 | |
fi |