Skip to content

Commit

Permalink
chore(ci): move codecov to nightly
Browse files Browse the repository at this point in the history
commit-id:1c01182b
  • Loading branch information
Itay-Tsabary-Starkware committed Dec 15, 2024
1 parent 723bf96 commit 9b5456d
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 57 deletions.
57 changes: 0 additions & 57 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,60 +137,3 @@ jobs:
env:
SEED: 0

codecov:
runs-on: starkware-ubuntu-latest-large
steps:
- uses: actions/checkout@v4
with:
# Fetch the entire history.
fetch-depth: 0
- uses: ./.github/actions/bootstrap

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- run: npm install -g ganache@7.4.3

# Setup pypy and link to the location expected by .cargo/config.toml.
- uses: actions/setup-python@v5
id: setup-pypy
with:
python-version: "pypy3.9"
- run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9
- env:
LD_LIBRARY_PATH: ${{ env.Python3_ROOT_DIR }}/bin
run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV

- name: "Run codecov on pull request"
id: run_codecov_pr
if: github.event_name == 'pull_request'
run: |
python3 -m venv ci
ci/bin/pip install -r scripts/requirements.txt
ci/bin/python scripts/run_tests.py --command codecov --changes_only --commit_id ${{ github.event.pull_request.base.sha }}
if [ -f codecov.json ]; then
echo "codecov_output=true" >> $GITHUB_OUTPUT
else
echo "codecov_output=false" >> $GITHUB_OUTPUT
fi
env:
SEED: 0

- name: "Run codecov on push"
if: github.event_name == 'push'
# TODO: Better support for running tests on push.
run: |
python3 -m venv ci
ci/bin/pip install -r scripts/requirements.txt
ci/bin/python scripts/run_tests.py --command codecov
echo "codecov_output=true" >> $GITHUB_OUTPUT
env:
SEED: 0

- name: Codecov
if: steps.run_codecov_pr.outputs.codecov_output == 'true'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true
version: "v0.1.15"
57 changes: 57 additions & 0 deletions .github/workflows/main_nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Main-CI-Nightly
on:
schedule:
- cron: '30 23 * * *' # Uses ubuntu runner.
workflow_dispatch: # Uses ubuntu runner.

env:
RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld"

jobs:
codecov:
runs-on: starkware-ubuntu-latest-large
steps:
- uses: actions/checkout@v4
with:
# Fetch the entire history.
fetch-depth: 0
- uses: ./.github/actions/bootstrap

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- run: npm install -g ganache@7.4.3

# Setup pypy and link to the location expected by .cargo/config.toml.
- uses: actions/setup-python@v5
id: setup-pypy
with:
python-version: "pypy3.9"
- run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9
- env:
LD_LIBRARY_PATH: ${{ env.Python3_ROOT_DIR }}/bin
run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV

- name: "Run codecov on pull request"
id: run_codecov_pr
run: |
python3 -m venv ci
ci/bin/pip install -r scripts/requirements.txt
ci/bin/python scripts/run_tests.py --command codecov --changes_only --commit_id ${{ github.event.pull_request.base.sha }}
if [ -f codecov.json ]; then
echo "codecov_output=true" >> $GITHUB_OUTPUT
else
echo "codecov_output=false" >> $GITHUB_OUTPUT
fi
env:
SEED: 0

- name: Codecov
if: steps.run_codecov_pr.outputs.codecov_output == 'true'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true
version: "v0.1.15"


0 comments on commit 9b5456d

Please sign in to comment.