feat: Add status tracking and error handling for job workers #87
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
name: Run Go Tests | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Restore cached cookies | |
id: cache-cookies-restore | |
uses: actions/cache/restore@v4 | |
with: | |
path: | | |
cookies | |
key: ${{ runner.os }}-cookies | |
- name: Run tests | |
#env: | |
# TWITTER_TEST_ACCOUNT: ${{ secrets.TWITTER_TEST_ACCOUNT }} | |
run: | | |
TEST_COOKIE_DIR=$PWD/cookies make test | |
sudo mv coverage/coverage.txt coverage.txt | |
sudo chmod 777 coverage.txt | |
- name: Save cookies | |
id: cache-cookies-save | |
uses: actions/cache/save@v4 | |
with: | |
path: | | |
cookies | |
key: ${{ steps.cache-cookies-restore.outputs.cache-primary-key }} | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |