Pylint run only when *.py present in current action, e2e switching ba… #21
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: End-to-End Test | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Start the server | |
| run: | | |
| python server.py -s & | |
| echo "Server started" | |
| - name: Wait for server to be ready | |
| run: sleep 5 | |
| - name: Send GET request and check response | |
| run: | | |
| response=$(curl -s http://localhost:5000) | |
| echo "Response: $response" | |
| if [ "$response" == "Hello there!" ]; then | |
| echo "The value received is correct" | |
| else | |
| echo "Received value is incorrect" | |
| exit 1 | |
| fi |