Skip to content

Update codecov version and add token #565

Update codecov version and add token

Update codecov version and add token #565

Workflow file for this run

name: Trigger ORNL GitLab Production Pipeline
on:
workflow_dispatch:
pull_request:
push:
branches: [next]
tags: ['v*']
jobs:
test-and-deploy:
runs-on: ubuntu-20.04
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
name: Setup Conda
with:
auto-update-conda: true
miniforge-version: latest
environment-file: environment.yml
- name: flake8
run: flake8 --statistics RefRed test scripts
- name: mypy type annotations
run: mypy RefRed test scripts
- name: dependencies synced
run: python ./scripts/sync_dependencies.py
- name: Run Tests
run: xvfb-run -a python -m pytest -vv --cov=RefRed --cov-report=xml --cov-report=term test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # required
trigger-deploy:
runs-on: ubuntu-22.04
needs: [test-and-deploy]
# only trigger deploys from protected branches and tags
if: ${{ github.ref_protected || github.ref_type == 'tag' }}
steps:
- name: Determine Environment
uses: neutrons/branch-mapper@v2
id: conda_env_name
with:
prefix: refred
- name: Trigger deploy
id: trigger
uses: eic/trigger-gitlab-ci@v2
with:
url: https://code.ornl.gov
token: ${{ secrets.GITLAB_TRIGGER_TOKEN }}
project_id: 7835
ref_name: main
variables: |
PLAY="update"
CONDA_ENV="${{ steps.conda_env_name.outputs.name }}"
- name: Annotate commit
uses: peter-evans/commit-comment@v2
with:
body: |
GitLab pipeline for ${{ steps.conda_env_name.outputs.name }} has been submitted for this commit: ${{ steps.trigger.outputs.web_url }}