Skip to content

Commit 8e7175f

Browse files
Merge pull request #92 from IntelPython/workflow-permissions
Workflow sets default permissions
2 parents e987644 + 7c3178d commit 8e7175f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/conda-package.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ name: Conda package
22

33
on: push
44

5+
permissions: read-all
6+
57
env:
68
PACKAGE_NAME: mkl_fft
79
MODULE_NAME: mkl_fft
10+
TEST_ENV_NAME: test_mkl_fft
811

912
jobs:
1013
build:
@@ -86,7 +89,7 @@ jobs:
8689
- name: Collect dependencies
8790
run: |
8891
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
89-
conda create -n test_mkl_fft $PACKAGE_NAME python=${{ matrix.python }} $CHANNELS --only-deps --dry-run > lockfile
92+
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME python=${{ matrix.python }} $CHANNELS --only-deps --dry-run > lockfile
9093
- name: Display lockfile
9194
run: cat lockfile
9295
- name: Set pkgs_dirs
@@ -107,13 +110,13 @@ jobs:
107110
- name: Install mkl_fft
108111
run: |
109112
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
110-
conda create -n test_mkl_fft python=${{ matrix.python }} $PACKAGE_NAME pytest $CHANNELS
113+
conda create -n ${{ env.TEST_ENV_NAME }} python=${{ matrix.python }} $PACKAGE_NAME pytest $CHANNELS
111114
# Test installed packages
112-
conda list -n test_mkl_fft
115+
conda list -n ${{ env.TEST_ENV_NAME }}
113116
- name: Run tests
114117
run: |
115118
source $CONDA/etc/profile.d/conda.sh
116-
conda activate test_mkl_fft
119+
conda activate ${{ env.TEST_ENV_NAME }}
117120
pytest -v --pyargs $MODULE_NAME
118121
119122
build_windows:

0 commit comments

Comments
 (0)