101_added_ci_tests #4
Workflow file for this run
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: Main Tests | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| test-commits: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Set environment variables | |
| run: | | |
| echo "BASE_URL=https://api.github.com" >> $GITHUB_ENV | |
| echo "BRANCH=master" >> $GITHUB_ENV | |
| echo "START_DATE=2024-01-01" >> $GITHUB_ENV | |
| echo "FINISH_DATE=2024-12-31" >> $GITHUB_ENV | |
| echo "TABLE_ID=test_table_id" >> $GITHUB_ENV | |
| echo "SHEET_ID=test_sheet_id" >> $GITHUB_ENV | |
| echo "GOOGLE_TOKEN=test_google_token" >> $GITHUB_ENV | |
| - name: Create test list file | |
| run: echo "isaacs/github" > test_list.txt | |
| - name: Run main.py and save output (commits) | |
| run: | | |
| python main.py --repo isaacs/github --commits -l test_list.txt -o output_commits.csv -t ${{ secrets.GITHUB_TOKEN }} | |
| - name: Compare output with reference CSV (commits) | |
| run: | | |
| python compare_csv.py output_commits.csv .github/workflows/reference_commits.csv | |
| - name: Run main.py and save output (contributors) | |
| run: | | |
| python main.py --repo isaacs/github --contributors -l test_list.txt -o output_contributors.csv -t ${{ secrets.GITHUB_TOKEN }} | |
| - name: Compare output with reference CSV (contributors) | |
| run: | | |
| python compare_csv.py output_contributors.csv .github/workflows/reference_contributors.csv | |
| - name: Run main.py and save output (issues) | |
| run: | | |
| python main.py --repo isaacs/github --issues -l test_list.txt -o output_issues.csv -t ${{ secrets.GITHUB_TOKEN }} | |
| - name: Compare output with reference CSV (issues) | |
| run: | | |
| python compare_csv.py output_issues.csv .github/workflows/reference_issues.csv | |
| - name: Run main.py and save output (pulls) | |
| run: | | |
| python main.py --repo isaacs/github --pulls -l test_list.txt -o output_pulls.csv -t ${{ secrets.GITHUB_TOKEN }} | |
| - name: Compare output with reference CSV (pulls) | |
| run: | | |
| python compare_csv.py output_pulls.csv .github/workflows/reference_pulls.csv | |