refactor: rename screenshot #12
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
| name: CI | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Java 17 for Spark | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - run: pip install -r requirements.txt | |
| - run: pip install pytest | |
| # make ready fake CSV for Spark test | |
| - name: Prepare sample data for Spark | |
| run: | | |
| mkdir -p data/new | |
| printf "date,open,high,low,close,volume,symbol\n" > data/new/stock_data_latest.csv | |
| printf "2025-01-01,1,2,0.5,1.5,100,AAPL\n" >> data/new/stock_data_latest.csv | |
| printf "2025-01-02,2,3,1,2.5,110,AAPL\n" >> data/new/stock_data_latest.csv | |
| printf "2025-01-03,3,4,2,3.5,120,MSFT\n" >> data/new/stock_data_latest.csv | |
| # env for Spark | |
| - name: Run tests | |
| env: | |
| SPARK_LOCAL_IP: 127.0.0.1 | |
| run: | | |
| pytest -q |