Skip to content

Commit 7363691

Browse files
committed
Change the test environment construction method
1 parent c3cbe59 commit 7363691

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,29 @@ jobs:
103103
toolchain:
104104
- 1.42.0-x86_64-unknown-linux-gnu
105105
- stable-x86_64-unknown-linux-gnu
106+
python-version:
107+
- '3.6' # https://packages.ubuntu.com/bionic/python3
108+
- '3.8' # https://packages.ubuntu.com/focal/python3
106109

107-
name: Expand_test (${{ matrix.toolchain }})
110+
name: Expand_test (${{ matrix.toolchain }}, ${{ matrix.python-version }})
108111
runs-on: ubuntu-18.04
109112

110113
steps:
111114
- name: Checkout
112115
uses: actions/checkout@v2
113116

117+
- name: 'Setup `${{ matrix.toolchain }}`'
118+
uses: actions-rs/toolchain@v1
119+
with:
120+
toolchain: ${{ matrix.toolchain }}
121+
override: true
122+
profile: minimal
123+
components: rustfmt
124+
125+
- name: Setup Python ${{ matrix.python-version }}
126+
uses: actions/setup-python@v2
127+
with:
128+
python-version: ${{ matrix.python-version }}
129+
114130
- name: expand.py tests
115131
run: bash ./.github/workflows/test-expand.sh

.github/workflows/test-expand.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ SCRIPT_DIR=$(cd $(dirname $0); pwd)
66
TEST_FILE="test.rs"
77
FILE_HEAD="fn main() {}"
88

9-
if [ -v CI ];then
10-
rustup component add rustfmt
11-
fi
12-
139
for MODULE in ${TEST_MODULES[@]};do
1410
echo Test module $MODULE
1511
python3 $SCRIPT_DIR/../../expand.py $MODULE > $TMP_PATH/$TEST_FILE

0 commit comments

Comments
 (0)