File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 strategy :
2828 fail-fast : false
2929 matrix :
30- python-version : ['3.10', '3. 12']
30+ python-version : ['3.12']
3131
3232 steps :
3333 - name : Check out code
4444 python -m pip install --upgrade pip
4545 pip install . --group test
4646
47+ - name : Register hf-hydrodata credentials as a public user
48+ env :
49+ TEST_EMAIL_PUBLIC : ${{ secrets.TEST_EMAIL_PUBLIC }}
50+ TEST_PIN_PUBLIC : ${{ secrets.TEST_PIN_PUBLIC }}
51+ run : |
52+ python utils/set_test_credentials.py
53+
4754 - name : Run unit tests
4855 run : |
4956 pytest --verbose
Original file line number Diff line number Diff line change 1+ """Set user credentials for hf_hydrodata package."""
2+
3+ # pylint: disable=C0413
4+
5+ import sys
6+ import os
7+
8+ sys .path .append (os .path .abspath (os .path .join (os .path .dirname (__file__ ), "../src" )))
9+ import hf_hydrodata as hf
10+
11+
12+ def main ():
13+ """Use environment variable secrets to set hf_hydrodata credentials
14+ for GitHub Actions testing."""
15+ test_email = str (os .environ ["TEST_EMAIL_PUBLIC" ])
16+ test_pin = str (os .environ ["TEST_PIN_PUBLIC" ])
17+
18+ hf .register_api_pin (test_email , test_pin )
19+
20+
21+ if __name__ == "__main__" :
22+ main ()
You can’t perform that action at this time.
0 commit comments